I have a problem with my jump animation in my early platformer game in the jump animation:
for my multi state jump animation the first part of the frame (1,2,3) is not playing but on the transition and the falling it's playing the right animations i create an function returning the current animation playing and print it, the animation are in the good order and during the right time and all those are printing but are not on the screen.
Here is my code:
if vel.y > -290 and vel.y < -220 and in_the_air:
state_machine.travel("JumpFrame1")
if vel.y > -220 and vel.y < -170 and in_the_air:
state_machine.travel("JumpFrame2")
if vel.y > -170 and vel.y < -20 and in_the_air:
state_machine.travel("JumpFrame3")
if vel.y > -20 and vel.y < 20 and in_the_air:
state_machine.travel("JumpFrame4")
if vel.y > 20 and vel.y < 140 and in_the_air:
state_machine.travel("JumpFrame5")
if vel.y > 140 and vel.y < 320 and in_the_air:
state_machine.travel("JumpFrame6")
if vel.y > 320 and vel.y < 500 and in_the_air:
state_machine.travel("JumpFrame7")
func animation():
if is_on_floor() and can_move_timer < 0:
if Input.is_action_pressed("right"):
state_machine.travel("run")
elif Input.is_action_pressed("left"):
state_machine.travel("run")
if on_floor_anim and not Input.is_action_pressed("right") and not Input.is_action_pressed("left"):
state_machine.travel("Idle")
if on_floor_anim and next_to_wall():
state_machine.travel("Idle")