Im attempting to have particles be killed after a certain amount of time, once their opacity is 1:
int $query=30; int $rand1=floor(rand(0,2)); if(frame % $query==1)nParticleShape1.opacityPP=$rand1; if (nParticleShape1.opacityPP==1) nParticleShape1.lifespanPP=0+3;
It kind of works, however some particles are being killed before they are visible(their opacity is 1), and some are not lasting the designated +3.
Would be great if someone could take a look?
Edit: Ah worked out the issue regarding the particles no lasting; a particle is visible and going through its +3 but if there is a division of 30 in that time which returns a value of 0 the particle will become transparent before its time. Now a solution? Still unsure why they are sometimes being killed before they are visible.
Edit2: When the opacity is hitting one the lifespan of the particle becomes 3 from when it was born, not from when it's opacity became one..hmm
Edit3: just realised should this be in scripting - sorry if thats the case.