[Solved] Problem with attack animation being stuck at Frame 0

I know I’ve been kind of a nuisance on this forum, but…

I have a problem with attack animation. I want it to play completely after pressing a button WHILE running.
So if the player is running AND presses B button, then the player sprite shows attack animation.

The problem is that when I try to do it only the first frame plays and only when the button is being pressed.
I want it to just play the full animation once, regardless if the player presses the button for a while or for a minute.

I’d show a screenshot of what I’ve tried, but… it’s such a mess that there’s no point.

Can anyone help?

I have to see the events to help you


I think I have to see .Player sprite picture also like this one

The animation seems to be in order (p1_run)

Where is the fight animation?


Add a command here named Tigger once.

I’ve tried this before. It’s even worse because the first frame of the animation shows up for half a second.

Well give me some time.I need to try this by myself.

1 Like

You need set the animation (already done), and start playing the animation once.

I think this is what you need GDevelop 5 Tutorial/Example - Dash (Using Tweens) & "Knock Back" Damage - YouTube

1 Like

This is perfect. On top of that, it also helped me figure out a couple of things.
Many thanks!

1 Like

Well I also have the same issue my players idle animation consist of many sprites so when I press b on my keyboard which is suppose to trigger the attack animation nothing happens please help

I have reviewed the image of the events, you have to read the events and think about the logic that goes with them and it’s normal that it doesn’t work.

If player is on floor, the animation change.
AND if player moving, the animation change.

We have a conflict here.
You need to condition when the player moves on the ground.

Look at the example Platform, it seems to me that the animation system works the way you want to do it.

No not that way I need it to play a Sprite animation when a button is clicked knowing that the idle Sprite is set to loop

Hi i came here looking for help on the same issue. accept its not my main character its an enemy. Has anyone offered any advice to help you solve it yet? I am currently testing out a solution if it works I’ll share my method.

1 Like