[RESOLVED] How do I fix that bug: on collision related event

Get help using Construct 2

Post » Tue May 05, 2015 2:55 pm

Hi all,

So I have add this bug for a little while. I'm not sure why this is happening.
Basically when the saw collides with a volume, it's supposed to change direction. See events and layout below:
https://copy.com/GpLQfOqIlmQXu7KF
https://copy.com/sNbkj8meGKWNuoxh

This is working most of the time but sometimes it seems to trigger twice and it goes into the wrong direction.

I have attached a capx to download so you can see what happens. You may need to refresh the page a couple of times because the bug does not always happen.

https://copy.com/lmsWI9PXADnIvxwe

Please let me know if I'm doing something wrong.

Cheers,
Last edited by DoudouSupreme on Tue May 05, 2015 5:06 pm, edited 1 time in total.
B
12
S
2
Posts: 85
Reputation: 899

Post » Tue May 05, 2015 4:28 pm

I'm wondering if the same detector is getting hit twice somehow. Rather than decoding the next direction from the current one, maybe try having the detector tell which direction to go next. That way if it's hit twice, you will still go in the same direction.

Just a thought.
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Tue May 05, 2015 4:50 pm

Good idea, thanks! I'll give it a try :)
B
12
S
2
Posts: 85
Reputation: 899

Post » Tue May 05, 2015 5:05 pm

@blackhornet Thanks, that fixed the bug. I can sleep tonight :)
B
12
S
2
Posts: 85
Reputation: 899


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 25 guests