When should I play Spawn Animation? (problem)

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

I’ve got a couple of characters which have a spawning animation. Right now I’m calling AnimationPlayer.play("spawn") on the character’s _ready(), the thing is it seems to wait for the next cycle after being added to the tree before starting out the animation so for a split second you can see the character in it’s idle pose.

I found that I can avoid this issue by saving the character’s scene with the character in the spawn animation’s initial frame but it’s very awkward and error prone when placing during editing since some of them are not even visible.

So to reiterate the question:
When’s the time to start the spawning animation in order to avoid this issue?
Am I doing something wrong?

I’m think in the animation tab there is an option to pick the default animation, I’m not sure tho, been a while since I did something with animations, if it is true tho pretty sure I found it out on one of these youtube tutorials

zen3001 | 2019-11-17 22:40

:bust_in_silhouette: Reply From: zen3001

yup, checked it, pretty sure that should do this
go to the animation you want to start with and toggle the autoload button

use the animation_finished() signal to change the animation to idle after this one is done.