Animation problem in gdevelop

I am also not using a playerhitbox for my character

suppose if I use the value as , 2


Then it is just adding a force to my player when x is pressed and when I press the left o right key again so first the player goes back then forward
com-gif-maker%20(4)
This is what I don’t want … help

Try to implement some sort of STM add at least 1 object variable to your player and call it Attacking or PlayerIsAttacking.
Then in your events just check if the variable is false when X button is pressed set the Attacking to true
Do the animation and check
if variable Attacking is true
Animation is. “Spin”
Animation finished
–>Change the Attacking to false
–>Player Stop all movement and remove forces
->Change the animation to “idle”

Another thing is this:
You maybe need to set an object variable to your player call it Direction:

So later in your events when
“Left” is pressed just change the variable Direction to “Left”
“Right” is pressed just change the variable Direction to “Right”

And finally just add one event and set the animation of your player based on the Direction variable
Like change animation of Player to Player.VariableString(Direction)
This way you sync the direction with the animation and it will never fail or show idle animation if the player is moving left or right.
Note: you maybe need to rename your walk animation to Left or right is up to you.

Hey, is it fixed. Is this what you wanted?
TtKWAqXcnr
Another thing, it doesn’t cause any Inside-Wall issue: