|
1 registered members (TipmyPip),
5,507
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
[SOLVED] particle is not removed ?
#465917
05/17/17 13:58
05/17/17 13:58
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Hi, I am not sure why but for some reason particles are not removed after time (/lifespan does not do anything), here is the code:
function spawnParticle (PARTICLE* p) {
p.bmap = ui_cursor; //just testing
p.size = 3;
p.alpha = 100;
p.lifespan = 2;
vec_set(p.blue, vector(255, 255, 255));
set(p, MOVE | TRANSLUCENT); //BRIGHT |
}
...
effect(spawnParticle, 1, ent.x, vector(0,0,20));
Last edited by Reconnoiter; 05/18/17 09:49.
|
|
|
Re: particle is not removed ?
[Re: Superku]
#465944
05/18/17 09:48
05/18/17 09:48
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Add p.event = NULL; to your spawnParticle() function. Otherwise, that same function or event would be executed for the same particle(s) each frame, continously resetting lifespan to 2. , tnx that was the indeed the problem.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|