I've recently bought Scirra personal edition, so I'm sorry if I sound kinda n00b
I'm looking at arrays right now, and I'm simply trying to draw a 3*3 grid. I got a sprite called Cube, so in the events sheet I put:
System-For "GridCols" from 0 to 3
System-For "GridRows" from 0 to 3 -> System-Create object Cube on layer 0 at (loopindex("GridRows")*50, loopindex("GridCols")*50)
it does draw the grid but debugging it shows inifite objects being created... am I missing something?
I read ahead about event sheet runtime, and saw it runs endless from top to bottom, so I guess it keeps creating them because the loop occurs again. so I added a "on start of layout" as the first condition, and all works just fine
Develop games in your browser. Powerful, performant & highly capable.
Either that or put them on a condition that does not continuously occur if you don't want it to only happen at start of layout.
I ran into a problem like this as well, I crated a global verbal to make things grow, so when i needed it to add. It changed the global verbal and then when it was done it changed it so it would not grow anymore.