Animation Lifetime
- This topic has 2 replies, 2 voices, and was last updated 10 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Home › Forums › TimelineFX Module › Animation Lifetime
Hi,
i’m new to TimelineFX and have several problems with setting the lifetime of an animation.
For some tests i used the Toxic animation of the example lib… ingame i couldn’t let the particle manager kill/end the animation after x milliseconds (f.e. 5000).
I tried setLifeTime(), swiched looping to false, and i also tried playonce.
Result is everytime an infinite animation.
How could i manage those things, without taking care by myself and let my code softkill the effect after x millsecs.
Hi,
Some effects will just keep emitting particles forever, this is dictated by the amount graph. So for example the toxic effect, if you look at the fire emitter in that effect you’ll see that there is only one node on the graph set at 40. That means it will just keep spawning particles until you call effect.softkill or effect.hardkill.
So if you want to end the effect ingame, just use softkill or hardkill (softkill will stop the emitter emitting, so the remaining particles die natually, and hardkill stops the effect immediately).
If you want the effect to end after 5 seconds by design, then you need to add an extra couple of nodes on the amount graph, and set them to 0 after 5 seconds. See screenshot:
Hope that helps š
That helped, thank you very much!
You must be logged in to reply to this topic.