Walk and shooting animation

Hello !

I have a problem on something for my game.

I have a Player Platform character with 5 animations : 1 - Stand, 2-Jump, 3-Walk, 4-Shoot(standing), 5-Walk and shoot

I have a problem with the shooting animations. I’m trying to do something like, when I press a button the character have a shooting animation. And when he walks and shoot at the same time he have different animation. The thing is that the 2nd animations doesn’t play full, only the first frame is playing and I don’t understand why.

Does anyone have an idea ?

Here is the thing :

Do = 4 to animation of player Do = 0 to frame of animation of player Play the animation of player
You probably also want to make sure the animation is looped. There is an arrow in the top right corner when you are adding the animation images in for de/activate loop.

Well the animation is looped and work perfectly when I play it in the sprite preview.

I tried your code but it didn’t changed sorry.

My other animations works well but this one doesn’t, it’s locked on the first frame.

I think you have more events that change the animation: The events to set the walk or stand animations execute even when you’re firing, so GD is switching between stand and fire-standing, or walk and fire-walking :slight_smile:
Move the events related to walk and stand under the events related to fire, if the character gets stuck in the stand animation instead fire-stand, you found your problem :wink:

Alright it worked !!
Thanks !

I just have one problem now, when I press a key my Player character is crouching. I want to stop him from moving when he is crouching.
But I dunno how.

disable automatism for movement when the character is crouched and re-activate it when the player is no longer crouched.