SetEffectLifeMode seems quirky??
by Steve George · in Torque Game Builder · 04/16/2006 (10:10 am) · 2 replies
Here is the issue
I create a bullet with a particle effect attached to it.
I use
%bullet.setLifetime(1);
to destrtoy the bullet after 1 second.
I thought this was also deleting the attached effect untill I noticed that the count kept increasing. The bullet and particle would disappear but the object count would only go down by 1.
so
I added this to the particle:
%smoke.setEffectLifeMode("KILL",.5);
this works only because I kill the particle before the bullet lifetime triggers.
If I set the value to anything longer than the life of the bullet, the particle still disappears but doesnt get removed from the object count.
example
%bullet.setLifetime(1);
%smoke.setEffectLifeMode("KILL",2);
Doesn't work.
but......this does work!
%bullet.setLifetime(1);
%smoke.setEffectLifeMode("KILL",0.5);
Is this they way it's supposed to work?
I create a bullet with a particle effect attached to it.
I use
%bullet.setLifetime(1);
to destrtoy the bullet after 1 second.
I thought this was also deleting the attached effect untill I noticed that the count kept increasing. The bullet and particle would disappear but the object count would only go down by 1.
so
I added this to the particle:
%smoke.setEffectLifeMode("KILL",.5);
this works only because I kill the particle before the bullet lifetime triggers.
If I set the value to anything longer than the life of the bullet, the particle still disappears but doesnt get removed from the object count.
example
%bullet.setLifetime(1);
%smoke.setEffectLifeMode("KILL",2);
Doesn't work.
but......this does work!
%bullet.setLifetime(1);
%smoke.setEffectLifeMode("KILL",0.5);
Is this they way it's supposed to work?
#2
04/16/2006 (11:35 am)
That looks like it matches :) I knew there would be a thread , I just couldnt find it. Thanks Tom!
Torque 3D Owner Tom Ogburn
Starlit Sky Games