Play animation after another finishes?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 9BitStrider
:warning: Old Version Published before Godot 3 was released.

How would be the best way to transition from one animation to another? In my game, the player takes a little step (a short, two frame animation) before the running animation plays. I want the running animation to play the moment the little step one finishes. Any thoughts?

:bust_in_silhouette: Reply From: avencherus

AnimationPlayer has a signal “finished”, that will play when an animation finishes playing.

If you want to get more specific or direct in the control and timing, you can more finely control things using the other functions available, as seen in the docs: AnimationPlayer

Gotcha. I’ve been referring to the docs. Wasn’t sure of the proper syntax to do this. Finally got it after some fiddling. Thank you!

9BitStrider | 2017-07-31 22:02

:bust_in_silhouette: Reply From: bruteforce

Connect the player’s finished signal to a “handler” function as avencherus said, or use yield()!
You can find examples (both solutions) in this topic.