Godot Version
4.2.2
Question
i am using AnimatedSprite2D
Select your animatedsprite2d node.
on the side panel (the inspector) you can see all the properties of the node.
click the “Node” tab at the top.
Select this signal, and connect it to your desired script.
it will appear as a function and you can replace what happens in there.
Hope this helps
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")