How to check which animation is finished?

Godot Version



i am using AnimatedSprite2D

  1. Select your animatedsprite2d node.

  2. on the side panel (the inspector) you can see all the properties of the node.

  3. click the “Node” tab at the top.

  4. Select this signal, and connect it to your desired script.

  5. it will appear as a function and you can replace what happens in there.

Hope this helps :slight_smile:


Building on this you check which animation played via the animation property

extends AnimatedSprite2D

func _on_animation_finished() -> void:
    if animation == "attack":
        print("done attacking")