Is there a code that will hold the animation until it is played?
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.
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.
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: