Im currently making a game where you need to click on an object several times so that the animation changes. The problem is when it has been clicked once it goes straight to the last animation. I want it so that you have to click 4 times to reach the last animation. Anyone know how i can stop it from doing this ?
Add "blocking flag" to every condition and action and reset this blocking flag after that clicking events:
1. Clicked on AO
+ anim=0
+ AO flag =0
-> change anim to 1
-> AO flag 0 set ON
2. Clicked on AO
+ anim=1
+ AO flag =0
-> change anim to 2
-> AO flag 0 set ON
3. Clicked on AO
+ anim=2
+ AO flag =0
-> change anim to 3
-> AO flag 0 set ON
4. Clicked on AO
+ anim=3
+ AO flag =0
-> change anim to 0
-> AO flag 0 set ON
5. Always
-> AO flag 0 set OFF
Like this.
If I think good, you are going to do some change-on-every-click block with 4 modes so it turns 0,1,2,3,0,1,2,3,0,1... You can also do it another way. Let's say you have anims 0,1,2,3 (stopped, walking, running, appearing(oops!) )... then you can do like this:
1. Clicked on AO
-> change anim to (anim+1) mod 4
Set frame's the best :---) (so bad TGF doesn't have this option :---( ).
"One action when event loops" doesn't work (in TGF for sure) with 1/0 switch like this:
1. Upon pressing "1"
+ anim "stopped" played
+ one action when event loops
-> set anim to "walking"
2. Upon pressing "1"
+ anim "walking" played
+ one action when event loops
-> set anim to "stopped"