loop, condition

Discussion and feedback on Construct 2

Post » Wed Feb 27, 2013 2:20 pm

Hi friends. Tell me how to be organized in Construct 2 condition? How to deal with the conditions in the loop? Why the loop does not work "wait" (iteration runs without waiting for their execution)?

B
9
S
3
G
1
Posts: 29
Reputation: 2,207

Post » Wed Feb 27, 2013 3:05 pm

Your JS doesn't work either (the testing i==6 one). If you follow the logic by hand, you see that you hit the i=loopindex condition twice. i starts at 3, then when loopindex = 3 you multiply i*2, so i=6. But the loop is still going, so when loopindex=6 the condition is met again, so i*2=12. At the end of the loop i=12.

For the Wait, add the action Destroy:Particles in the On Start to get rid of the original.blackhornet2013-02-27 15:14:23
ImageImageImage
B
67
S
19
G
121
Posts: 3,196
Reputation: 72,879

Post » Wed Feb 27, 2013 4:36 pm

Even if the example in JS not true it does not change the point. Why cycle to Construct 2 does not wait until the end of execution every time, and runs all the time passes time without waiting for the previous (wait)? How to write clear conditions inside the loop but continue execution of the body of the program after the loop?


B
9
S
3
G
1
Posts: 29
Reputation: 2,207

Post » Wed Feb 27, 2013 4:41 pm

Loop does not work consistently. Why does it work in parallel? Not waiting for the implementation of its previous iteration to the end. If I got in there and made a loop condition is on the end of loop to continue the program?
B
9
S
3
G
1
Posts: 29
Reputation: 2,207

Post » Wed Feb 27, 2013 4:47 pm

Wait does not block. It puts those events aside for one second, then runs the following actions, so in this case they are all put aside at the same time. There are many threads on writing timers. Have a search.
ImageImageImage
B
67
S
19
G
121
Posts: 3,196
Reputation: 72,879


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 13 guests