Event Fires even when conditions false...

  • 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...

    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.

  • The wait action is probably causing the trouble.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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.

  • 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.


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)