Platformer walking/jumping problem
Cpt.Dallas
Member Posts: 6
I'm trying to build a platformer game and am having a problem with the character animations. I have it set up so that when moving left or right a walk animation plays. I have also set up a change image behavior for when the character is jumping.
The problem I'm having is when the character is jumping diagonally left or right the walk animation plays (I think this is because to jump diagonally the jump and right/left buttons are pressed together), making it look as if the character is walking in mid-air. I want to make it so that only the jump image is displayed while the character is off of the ground, whether jumping straight up or diagonally.
I cannot seem to find a solution, any help would be appreciated.
Comments
Create a game attribute of "PlayerJumping", then play around with that. So, say, if the player is not touching the platform, change "PlayerJumping" to true. Then, if "PlayerJumping" is true, change to "Jumping animation".