for loops Exemple (Help)

Discussion and feedback on Construct 2

Post » Tue Sep 20, 2011 5:04 pm

For 0 to 9       Print "Hello!" This will print "Hello!" 10 times.

Not difficult to understand, but my loop want not stop.
I'm following this exemple just like thathttp://www.scirra.com/tutorials/40/basic-loops-and-arrays, but without sucess.

Can Anybody give me please a simple "for loop" Example ?
I want to get out where is my mistake in thinking.

Thank your for your time !
B
21
S
5
G
5
Posts: 163
Reputation: 5,033

Post » Tue Sep 20, 2011 5:13 pm

Posting a .capx of what you've done will help us understand what you're doing.

Don't forget the event list is read once a tick (~60 times a second). So if you have a single event with a for loop in it, it will run ~60 times a second. Maybe you want to put the loop under a different event, like a key press or 'start of layout'?
Scirra Founder
B
373
S
218
G
84
Posts: 23,446
Reputation: 186,082

Post » Tue Sep 20, 2011 5:43 pm

...So if you have a single event... Yes that is the mistake
Thank you Ashley for the kick in right direction ! now everything is fine
B
21
S
5
G
5
Posts: 163
Reputation: 5,033


Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, Alalala, Palnix777, Silverforce and 6 guests