Event Fires even when conditions false...

Discussion and feedback on Construct 2

Post » Sat May 13, 2017 4:44 am

I have no idea how this is possible, but take a look at the below - when employees hit waypoints, they fire an event "gobble path" that moves them along.
Here's the code:
The code specifically prevents the event from continuing if the waypoint's ID is <= 0, however...
Image


Image

As you can see from the above snippet, it fires even if the Waypoint is 0, and it fires many times.
Causing erratic craziness like running through walls.

There is only one function that issues this comment, before you ask.

Help? We are all dead stumped and have no idea how this can even be possible.

EDIT: Removed frustrated profanity from the comments.
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Sat May 13, 2017 5:19 am

The wait action is probably causing the trouble.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Sat May 13, 2017 6:24 am

Let me try disabling it. The current walking_steptime is 0.06 seconds, so, I figured that would be inconsequential but...
Why do you think the wait in that case would cause issues? It seems so random?
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Sat May 13, 2017 6:41 am

The action that shows an object with an id of zero is after the wait action, and the wait action has been a common source of issues. It could be a bug in this case that the wait doesn't save the picked waypoints so that a waypoint with id 0 is picked after a wait, or some other event is changing the id of the waypoint before the events after the wait can run.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Sat May 13, 2017 6:56 pm

I'm hesitant to say this has fixed it. It's fixed, but I've put in a million fixes in the past and then it's come back out of nowhere lol.
This does seem to have done the trick though, so I could freaking kiss you. Thank you so much.

M
B
21
S
6
Posts: 77
Reputation: 1,445


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests