Problem with "For" loop

Get help using Construct 2

Post » Thu Jul 04, 2013 6:05 pm



I just created "for" loop from 1 to 3 to create 3 objects.
And then the game started to repeat this action indefinitely.

What wrong with that?

.capxVladoss2013-07-04 18:09:03
B
39
S
16
G
6
Posts: 238
Reputation: 7,875

Post » Thu Jul 04, 2013 6:13 pm

Event sheets are calculated every tick. So you are creating 3 objects every tick. You need some sort of trigger or condition if you wish it to run only once. Try the same thing, but at your for loop condition add 'Trigger once while true' from system events.
B
24
S
8
G
7
Posts: 756
Reputation: 7,242

Post » Thu Jul 04, 2013 6:18 pm

[QUOTE=vee41] Event sheets are calculated every tick. So you are creating 3 objects every tick. You need some sort of trigger or condition if you wish it to run only once. Try the same thing, but at your for loop condition add 'Trigger once while true' from system events.[/QUOTE]

It's always been that way?Vladoss2013-07-04 18:19:28
B
39
S
16
G
6
Posts: 238
Reputation: 7,875

Post » Thu Jul 04, 2013 6:21 pm

[QUOTE=Vladoss]
It's always been that way?[/QUOTE]

As far as I've been using C2, and my guess would be for eternity before that as well. :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,242

Post » Thu Jul 04, 2013 6:27 pm

[QUOTE=vee41] [QUOTE=Vladoss]
It's always been that way?[/QUOTE]

As far as I've been using C2, and my guess would be for eternity before that as well. :)[/QUOTE]

Thank you.
B
39
S
16
G
6
Posts: 238
Reputation: 7,875


Return to How do I....?

Who is online

Users browsing this forum: LukeW, oddreal and 3 guests