While - Doing one event at a time

Get help using Construct 2

Post » Mon Jul 30, 2012 7:41 pm

Hello, how do I make the next loop of a while event happen only when the last one finished?
In this example Im trying to flash each number just after the last one finished flashing. Is there any way to do this?
https://dl.dropbox.com/u/6813637/while_example.capx

Thank you!
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Mon Jul 30, 2012 8:18 pm

You're just doing it wrong with the "While" condition.
Actually your all event 1 is bogus.

What you want to do can be achieved in a more logic way : capx

You have to remember that while will make a loop that will "block" the execution of the event sheet as long as the conditions aren't met, staying "in the same tick".
Then, once the while loop is completed, it gives back the hand to the normal execution.

Anyway, using a while to do what you wanted is counter-productive and not the good way to go.Kyatric2012-07-30 20:19:38
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Jul 30, 2012 9:21 pm

Thanks @kyatric, I see then that while is useful for different things.
Ill study your example ;]
B
38
S
8
G
3
Posts: 438
Reputation: 6,869


Return to How do I....?

Who is online

Users browsing this forum: Lof, YoHoho and 20 guests