All Questions


andrew winter
posted to: The Spawn State

Is there any risk in calling animation play before connecting to its signal?

Could you ever risk missing an event by calling play before connecting to the event like you do in this video? Or going the other way (in a project where more nodes are interacting with the skin), if you connect to the animation_finished event before calling play, could you  possibly catch an event triggered by some other node playing a skin animation? Or is Godot somehow immune to such timing issues? Like maybe the play command doesn't actually take effect until the next tick after the 'enter' function is complete?

  • Nathan Lovato replied

    Yeah, there's no risk. When you start a new animation, you're stopping the previous one, so you won't get the animation finished signal. And as both the connect and play instructions run in sequence in the same function, you can consider they happen simultaneously.