Spawning and removing many animated objects


I’d like to have an animation like so:

I’d like to be able to play this spawn this animation at a certain position in space and terminate it after it’s played.

In this file (741.1 KB) I created some spheres, animated them and parented them to an empty.

My node setup looks like this:

My main issue is this:

  • I do not want to use sleep: it depens on the number of frames in the animation and the play rate (60Hz). I’d rather like the animation to stop when it’s played once. (I tried to use the animation state node but to no avail.

I do not need to use nodes, a solution using haxe would be fine for me as well.

Any hints are very much appreciated.

Given that this seems the perfect use-case for the Animation State node, I’m wondering what happened when you tried this…

Well, first of all my empty is not animated. So the object spawned is not animated either and it does not make sense to get the animation state of a non-animated object.

I then tried to dummy animate the empty. But this did not help either. I thought I’d be somehow able to control the animation only by the parent (i.e. the empty). But I failed.