Remove particle when ended
#1

Hello people,

So when i create a particle (a non looping one).
it automaticly stops but the particle is actialy still there.

How do i remove the particle right when it ends?
Reply
#2

you have to get all particle time lengths and do like

make a custom createobject and settimerex to destroy the object.
Reply
#3

I use to use this:
pawn Код:
forward DestroyObjectPub(objectid);
public DestroyObjectPub(objectid)
{
    DestroyObject(objectid);
}
Then, when creating the particle object:
pawn Код:
SetTimerEx("DestroyObjectPub", time, 0, "i"; objectid_of_the_particle_object);
Where "time" is the estimated time the particle effect runs.
You could also combine this in a CreateTimedObject function that automatically creates and removes the object after a given time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)