Reset Variables after Animation?
MADGames
Member Posts: 12
Hi forum,
Just a quick question cos I've been racking my brain over this.
In my game, I "count" how many swipes the user does then when it hits 5, an animation occurs. To do this I made an attribute called "SwipeCount" and everytime a swipe was registered, it increased SwipeCount by 1.
When SwipeCount = 5, the animation plays. But how do I make the variable go back to 0 so after another 5 swipes, the animation plays again?
Things I've tried:
When SwipeCount = 5, Animate, SwipeCount = 0
When SwipeCount = 5, Animate, Timer 0.1 Second, SwipeCount = 0
When SwipeCount = 5, Animate, Change Attribute "SwipeReset" (boolean) to true. When SwipeReset = true, Change Atrribute SwipeCount = 0
Any ideas?
Just a quick question cos I've been racking my brain over this.
In my game, I "count" how many swipes the user does then when it hits 5, an animation occurs. To do this I made an attribute called "SwipeCount" and everytime a swipe was registered, it increased SwipeCount by 1.
When SwipeCount = 5, the animation plays. But how do I make the variable go back to 0 so after another 5 swipes, the animation plays again?
Things I've tried:
When SwipeCount = 5, Animate, SwipeCount = 0
When SwipeCount = 5, Animate, Timer 0.1 Second, SwipeCount = 0
When SwipeCount = 5, Animate, Change Attribute "SwipeReset" (boolean) to true. When SwipeReset = true, Change Atrribute SwipeCount = 0
Any ideas?
Comments
@MADGames
Strange that none of those Change Attribute behaviours are getting through...
Maybe try:
When SwipeCount = 5
Animate
Timer: After ----length of time of animation
Change Attribute SwipeCount to 0
or:
When SwipeCount = 5
Change Attribute SwipeCount to 0
Animate
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS