Check if sprite animation is playing or not? (SOLVED)

I’m totally new so this is a pretty newb question but is there a way to see if an animation is playing using lua? I want my script to check if the animation for the inputed direction is playing and if it is to not play a new one.
Or if there’s a easier way to do direction changes I would love to know.
I’m thinking something like

onInput {
if (is running) {
do nothing
}
else {
start animation for direction
}
}

Why not do exactly that? When starting an animation, you set a variable ‘isRunning’ (or whatever name you wish) to true, and when you receive the ‘animation_done’ message upon finishing the animation you set the variable ‘isRunning’ to false.

1 Like

lol thats a great Idea, I forgot about the animation_done, thanks a ton!

1 Like