I have an animated player sprite that moves into a different animation when it dies. I am using the W key as a forward movement and angle is locked to the mouse. The problem I am having is when the player sprite dies if I am moving when the death happens the sprite immediately resets to the movement animation assigned to the W is down action. I need it so that when the player sprite dies it no longer sees the W is down action until after the death animation and the player sprite is created again.
Use instance variables like this to dictate phases of your character. For example if character phase variable =1 movement is allowed, set at default numbers The character "dies" set the variable to 2. While the variable is 2 this could decrease character speed to 0 etc.
Thank you for your reply. I'm sorry i'm a noob at this. I created the group Player and placed all of the movement events in there. Now how do I deactivate the group within the death and destroy scenario?
You will see that when one of the enemies (jittery flying rocks) hits the player the player goes into a death animation. If you are moving when the player gets hit by the enemy you don't see the death animation because it registers the pressing of the W key and plays the moving animation. The death animation works fine if you sit still and wait for an enemy to hit you. The other issue is when you are lying dead on the ground you can still shoot. But I assume both issues can be fixed with the same process.