Hi. Your method is working fine. Thank You. But if You are here, I have one question. In animationSprite2d I use this code:
func _on_animated_sprite_2d_animation_finished():
if([“jump_end”, “jump_start”, “jump_double”].has(animated_sprite.animation)):
animation_locked = false
I used it to Lock animation for proper landing on the ground.
And then I switched to animationPlayer to use delay for my jump start animation. Now I can’t find solution how to change those lines. Maybe You know and can help me?
func _on_AnimationPlayer_animation_finished(anim_name):
If anim_name == “jump_start” or “jump_end”:
animation_locked = false
Is not working and I am not sure what I am doing wrong.