Hold code until animation is played?

Star_FrogStar_Frog Posts: 2Member

Is there a code that will hold the animation until it is played?

Comments

  • MegalomaniakMegalomaniak Posts: 2,615Admin

    Could you elaborate a bit as to what exactly you are looking to do? yes there are ways to pause and resume animation playback, but how to best go about it would depend on what exactly you are trying to do.

  • DanySnowymanDanySnowyman Posts: 15Member

    I'm true newbie but I can tell you that animation player can call a method from his timeline. Its useful If you want, for example, to queue_free() an enemy only when his dead animation is completed. Simply add a function track to the animation player & call the method you want at the desired time.

  • MegalomaniakMegalomaniak Posts: 2,615Admin

    Ah, I misinterpreted the question altogether. Yes, in the animation player you can create a Call Method track, once it hits the function/trigger key-frame it can call a method(a function in a script) for an example:
    https://docs.godotengine.org/uk/latest/tutorials/animation/introduction_2d.html#advanced-call-method-tracks

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file