Is there a way to send the animation_finished signal for only certain animations?

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

I have some animations which I want to signal when they’re finished.

I only want some, not all of them to do this.

Initially, I tried putting in function calls manually on the last keyframe of the animations, but I found that this actually calls that function on the frame before the last one, which isn’t suitable for what I want.

My current approach is to use the animation_finished signal and pass along the name of the animation, but this is quite messy and brittle because in the code I have to check whether the animation that finished is one of the ones I’m interested in via a big string comparison block.

Basically, is there a way to effectively have the animation_finished signal for each animation individually, rather than for the animation player as a whole?