For Next Loops
Auric
Member Posts: 35
Okay guys I know there is an example somewhere but I can't for the life of me remember where it is on the site. I need the GS equivalent to:
For Y = 1 To 10
For X = 1 To 10
'Do Something
Next
Next
Thanks!
For Y = 1 To 10
For X = 1 To 10
'Do Something
Next
Next
Thanks!
Comments
And you'll want to do the same thing with the X and put that rule inside the Y rule.
http://i3.photobucket.com/albums/y58/MattVG/spawnLoop.png
EDIT:
And example project:
http://gamesalad.com/game/play/29635
Just experimenting with some game logic and I can't get the above code working (as detailed in the screenshot 'spawnLoop.png' in the last message. Has anyone got a basic ForNext type loop documented or an example ? GS seems great for prototyping games but seems a little hard work where perhaps it shouldn't be. Thx for any help.
The Loop (Spawning) didn't run on my machines either. To make it run there's a few ways, but the quickest is just to put all the [Behaviour Code] in the 'Spawner' Actor into a [Timer].
IE. Timer: Every 0 Seconds
Then it works for me.
I'm a cautious person and always looking ahead for the next pitfall !