animation_finished signal not triggered?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By vnmk8

I have a Skeleton2D node for my player, the animations are handled by the AnimationPlayer node with a AnimationNodeStateMachinePlayback resource type in a AnimationTree Node, to change animations I use eg:"run"). now the AnimationPlayer node has a built-in signal called animation_finished(anim_name) that should trigger when any of the animations are finished playing but when I connect this signal nothing happens what am I doing wrong? is that the way the signal is supposed to be used?

:bust_in_silhouette: Reply From: theMX89

maybe i could see your code? the way you describe your problem, everything seems to be right.

it should look something like this:

func _on_AnimationPlayer_animation_finished("walk"):

pass # Replace with function body.

(thats just an example)

it works when i use eg:"run") the animation_finished(anim_name) signal triggers but not when i use"run") to switch between animations.

vnmk8 | 2021-07-31 19:40