So I'm trying to make my character have a falling animation that plays if the player doesn't press the jump button but still goes off a ledge. I'm still pretty new to this so I don't know if I have to rearrange my whole animation code or just add something.
func _process(delta):
if on_floor == false:
if Input.is_action_pressed("Jump"):
$AnimatedSprite.play("Jumping")
elif is_on_floor():
if Input.is_action_pressed("ui_right"):
$AnimatedSprite.play("Running")
elif Input.is_action_pressed("ui_left"):
$AnimatedSprite.play("Running")
elif Input.is_action_pressed("Jump"):
$AnimatedSprite.play("Idle")
else:
$AnimatedSprite.play("Idle")