Why don't my loops stop?

Get help using Construct 2

Post » Sun Sep 11, 2016 1:53 pm

When I use "For" from 1 to 3, the loop just continues and does not stop at 3. I even used Stop Loop action, but it doesn't work.

It's the same with "Repeat"....
B
19
S
7
Posts: 140
Reputation: 1,772

Post » Sun Sep 11, 2016 2:13 pm

You can do that :
Image
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Sun Sep 11, 2016 2:25 pm

That's strange, than what is this "3 times" used for?
B
19
S
7
Posts: 140
Reputation: 1,772

Post » Sun Sep 11, 2016 2:42 pm

I could have used a "for" loop, it would have worked the same.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Sun Sep 11, 2016 2:55 pm

You need to post your events. There's no reason Stop Loop shouldn't work.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Sun Sep 11, 2016 4:43 pm

Using stop loop action doesn't mean it will be stopped forever. What it does is to stop the loop on that thick. If that condition is still true on the next thick then it will keep running. You have to use something to break the loop like a variable Stop = 1. To do that use in a sub-event a condition that verifies in which loopindex it is, if its on the last index then put Stop to 1.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Donald Cela, Hadyurik, Yahoo [Bot] and 10 guests