Hello, very beginner here. My dashing animation is being canceled by player idle and player animations, how can i fix this?
if is_on_floor() and !current_attack:
if Input.is_action_just_pressed("Z"):
dashing = true
$Dash.start()
if !velocity:
animated_sprite.play("Player İdle")
if velocity:
animated_sprite.play("Player Run")
toggle_flip_sprite(direction)
elif !is_on_floor() and !current_attack:
animated_sprite.play("Player Jump")
I suppose the code you’ve shared is in _process, right?
In such a case, that would mean that every frame, at least one animation (Player Idle, Player Run or Player Jump) is played, overriding any other punctual animation.
You could try adding a not dashing condition to player your idle/run animations. Let me know if that works, and if not, please share the full code