Clearing specific particle objects

Hi

I am currently looking at using 3 separate particle effects on screen. All separate entities.

I am modularizing my code so i basically create a seperate lua file for each effect and call those into my main.lua and added to localGroup.

Now what I would like to do is it to be able to kill/remove say one of these particle effects but keep the others rolling.

I started out by adding a function to each of my particle “classes” (use the term loosely) that was called from main to nil my emitter and CleanUp. However I didn’t realise that CleanUp seems to be global so it kills the other two at the same time.

Therefore I have now used stopEmitter to stop individual effects and wondered if this actually still has an impact on performance? When the level ends I am calling CleanUp to kill all of them anyway. Is this the best way to do it???

thx

ade
[import]uid: 66324 topic_id: 11627 reply_id: 311627[/import]

You can kill individual particles by setting the .killTime property of a particle to the current time. See included sample “Sample_Looping_through_Particles” and the GetParticle( ) command as described in the manual. [import]uid: 10504 topic_id: 11627 reply_id: 42458[/import]