Animation problem in gdevelop

hi everyone , I have one problem i.e.
these are my events-


In the last event ,when I press x key the player does not perform the spin attack animation instead it stops performing idle animation too…
How do I fix it

Please help!:smiley:

Its because you are changing animation to spin attack and at the same time, changing it to other
image
animation.
To fix it, let me ask a question:
Where do you want the Player to do a spin attack? In the air or on the platform?

on the platform @Muzan

Please reply @Muzan for help

If that’s the case, then you might wanna do


In the marked event, add a condition called spin_attack animation of player is being played and invert it.


still not working

:disappointed_relieved: even not working

I forgot to tell you but do the same for here too

It’s still not working?

it’s working now … Thanks
How you thought of it (what is the reason)
I am new to gdevelop

Does it mean that when the animation of player is not spin animation then set it to idle and walk

what if the animation was to be played in the air

It’s because when you change the animation, it gets changed to idle or walk animation again.

Try it. If that doesn’t happen then tell here.

No, it will not play the animation in the air. To play it in the air, add the same condition to here too:


And also, make another event that says:
Player is falling and the spin attack of Player is playing (inverted), then change the animation of Player to fall

If spin attack is an animation with frames, then it won’t work if you hold the x key down - it’ll just keep playing the first frame of the spin attack until the x key is released. You should add a trigger once on that last event.

Similarly, add a trigger once the the events with the conditions “left key is pressed” and the “right key is pressed”

Also, if the spin attack animation is playing and you press any other key, the spin attack will stop mid animation and change to the other one. Is this what you want?

Actually my problem is this -
This is my spin attack animationcom-gif-maker
And when I preview it com-gif-maker%20(1)
While previewing I noticed that after the completion of spin animation it automatically moves 2 steps back
Why is this???
Please help

Check your origin point, there may be the problem.

How do I check it in game ?

Please provide me the solution