Lifespan Decay

From Valve Developer Community
Jump to: navigation, search
Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Underlinked - Logo.png
This article needs more links to other articles to help integrate it into the encyclopedia. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024


Generic Operator Options

Lifespan Decay

Kills particles whose lifespan has elapsed.

While particles have a life duration that is usually initialized upon creation, without an operator to actually destroy the particle, the life duration is just another field filled with data. Decay operators act upon various conditions in order to destroy particles.

Lifespan Decay checks against the particle's lifespan and if it has exceeded that time, kills the particle.

Note that without a Decay operator of some sort (or one that, due to endcap settings, is never activated) that particles will never be killed. So even if a particle fully fades, scales to 0 radius, and has its life duration exceeded, without a Decay operator of some kind, those particles will continue to exist, costing memory and processing power. A quick way to ensure your particle system is correctly ending and cleaning itself up is to check the preview window in the editor. If your effect is looping there, it is functioning properly. If it appears to stop and never restart, it (or a child of it) lacks a proper Decay operator. For continuous or effects which use and EndCap, pressing the "Stop" button in the Particle Editor should cause it to play its EndCap and restart.