[Solved]Help with looping

Hi,
I have a problem with my attack animation looping as long as the “a” button is pressed.


What I want is for the character to only play the attack animation once.
The problem that I’m having is that I made sure that the animation is set to “don’t loop”, and I added a trigger once condition to both the event and sub-event.
I’m sure I did something wrong, but I don’t know what it is.

You just need use 1 var and 1 timer to put a ‘cooldown’ in your attacks, something like 0.3 secs should be enough, but really depends what you game will be.

I hope you undestand my img to how make a cooldown using a var and a timer.

basicly you need the skill is off cooldown (var cooldown = 0) to attack, and when attack you will put the skill on cooldown (var cooldown = 1) and will start a timer, when timer reach the condition of time you want, you just turn off cooldown (var cooldown = 0 again).

you should put a trigger once condition with the a key pressed condition. but thats not enough, because you do wrong the whole logic. you should pull the sub-event out in the main columb.

it worked! Thank you

1 Like