View Full Version : nParticles Dying all at once

03 March 2010, 07:54 PM
Hi all, Having some trouble with a grid of nParticles being killed of by use of the nParticle Event editor...Basically the scene is an object emitter of nParticles pushing into a grid of nParticles that need to be killed when they leave the frame. Used the nParticle Event Editor to get the particles to be killed when they hit a collider, which works; except the whole grid of particles gets wiped out when the first collision occurs. Any help would be greatly appreciated, client is breathing down my neck!!

03 March 2010, 12:16 AM
The nParticles need to be killed off when when they leave the frame of the shot? Which nParticles? the grid or the ones being emitted? Try having 2 separate paricleShapes being the grid, the other being the particles emitted into the grid of nParticles. Also have 2 separate collision events. That way you can separate your if condition statement to a tee and be more specific saying something like...
Lets say you have,
Which means you would also have
You want the nParticles named ParticleShapeA to be killed off on first collision but not ParticleShapeB

if (ParticleShapeA.event1 == 1)
ParticleShapeA.lifespanPP = 0;

Which will kill off a each specific particle that hits on first collision of that specific collision event.
Make sure you are creating a lifespanPP per particle attribute and setting the lifespan to lifespanPP or this will not work.

Is this what your trying to do? let me know if you have any questions.

CGTalk Moderation
03 March 2010, 12:16 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.