Game maker studio 2 jump animation

broken image
broken image
broken image

If (vsp 0) sprite_index = spr_player_jump Key_jump = keyboard_check_pressed(vk_space) Here's the code I'm using: //get player input Everything was working fine before I added the 'animate' section. I'm very new to game maker and programming in general, so I'm probably making some dumb mistakes. While moving sideways, the sprite slowly sinks into the floor. Both of the sprites flash when this happens. When I move side to side, the jump sprite moves along the ground while a single frame of the running sprite animation shows up above it and to the side. It now flashes in the same location as the run sprite when moving to the side. EDIT: I changed the origin of the run sprite to the center, and it is no longer hovering above the jumping sprite.

broken image