How do I control loops? Events fire after stop loop

Get help using Construct 2

Post » Mon May 09, 2016 3:18 pm

I have a function that keeps getting called even though it shouldn't. I thought, "end loop" would end the loop but events are still firing.

Here's the function in question:
Image

The event on the bottom still fires and I see the text "We shouldn't be here". The loop isn't being stopped before that bit of code executes.

This loop itself shouldn't even be firing because of the other loop I'm using ends up calling this function. That function:
Image

For some reason both tool > 0 fires and tool < 0 fires. I suspect this is a picking issue.
B
10
S
2
G
2
Posts: 73
Reputation: 1,044

Post » Mon May 09, 2016 3:24 pm

'Stop loop' just stops the next iteration, it does not immediately return from that position.
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Mon May 09, 2016 4:12 pm

I reversed the order of the events and that seems to give me the desired result. Thanks for your help.
B
10
S
2
G
2
Posts: 73
Reputation: 1,044


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests