The only way to kill a certain particle Id is to give it a lifespan of zero. For example:
//RUN TIME EXPRESSION FOR REMOVING PARTICLES AFTER THEY REACH //10 ON Y AXIS //GET THE POSITION OF PARTICLES vector $pos= particleShape1.position; //CHECK TO SEE IF THEY HAVE PASSED A CERTAIN Y VALUE (10 in this example) if ($pos.y>=10) { int $pi=particleId; //PRINT IDs OF PARTICLES TO BE REMOVED print ($pi+"\n"); particle -e -at lifespanPP -id $pi -fv 0 particle1; }
To attach this script to an emitter:
- Show the particalShape and open the Attribute Editor.
- Change the life span from live forever to lifeSpanPP Only.
- In the Per Particle (Array) Attributes section, right-click on the Position attribute and select Runtime Expression (before or after dynamics calculation).
- Paste the script into the Expression Editor and click Create.