Can gamesalad do for loop?
100062114
Member Posts: 13
in Help Wanted
There is some more complex data structure in my game,
so I need for loop.
But there seems to be no for loop behavior in gamesalad.
How can I create for loop in the other way?
Comments
There is a loop behavior (Maybe not for windows)
Window Pro version has loop behavior?
Hi @100062114 - personally I've no experience with the Windows version of GSC but I'd be surprised if a Loop Behaviour was made a Pro feature only, in it...
The loop Behaviour is a relatively new addition to the Mac version of GSC so maybe the Windows loop will appear some time in the future.
For the while, you can create different types of loops in a couple of ways using your existing behaviours and Rules. The following is a few examples :
A never-ending loop:
A conditional loop:
Same as above, except nest it in another Rule, something like:
-- same as above, etc
There's a few others but hopefully that's enough to get you started.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I want to create a for loop which will be started after a butten is pressed.
Now, in my code, the for loop can work by itself, but it can't work with button.
My rule is like the fllowing:
Rule:
when all of the flowing are happening:
touch is pressed
Rule:
when all of the flowing are happening:
if game.loop<5
do
timer:
every 0.1second
change attribute:
set game.loop to game.loop+1
How can I fix this problem?
Read this thread http://forums.gamesalad.com/discussion/44707/timers-are-for-chumps-gs-optimization-tips it will help you or you could use the Loop group. Some behaviours will not work in a Loop group read its description to find out.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@100062114 You have already started a thread concerning your loop problem - please don't don't make multiple threads on the same question/subject in future as it causes confusion, amongst other things. I'll merge that thread with this one now.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps