Skip to reading
Shaders, Effects & Layered Scenery

36. Stop emission, hide an effect or detach it

Edition 0.86.4.0

Revised 0.86.4.0 edition with new supplements; earlier 0.86.3.4 lessons and screenshot labels are retained within the supplied PDF.

Download PDFView PDF page
Source table from 36. Stop emission, hide an effect or detach it, page 40
OperationWhat it means
particle.enabled = falseStops runtime emission. Ordinary particles already alive can continue fading until their life ends. Specialized effects can stop/rebuild differently.
Set Object Visible = falseHides the entity’s visual result. Use when the whole effect must disappear immediately.
Detach Particle EffectReleases the follower link and keeps the emitter at its current world pose. It does not switch emission off.
Detach then disable emissionLeaves a source behind and stops new pieces, allowing a supported ordinary tail to finish.
Switch preset in the editorLoads a new recipe. Do this while authoring rather than expecting arbitrary runtime conversion.

Choose the intended ending. A hand aura should usually disappear with the hand effect. Exhaust might stop producing new particles while its old wisps drift away. An explosion should normally finish its smoke rather than vanish at the end of the fireball.

1. Write down which entity owns the visual and which event turns it on.

2. Decide whether the end should stop emission, hide it, detach it, or combine those actions.

3. Test during movement as well as while idle.

4. For a cutscene, run the same cleanup after normal completion and after skipping.

Removing the target or changing rooms is not a substitute for a clear effect lifecycle. A script that controls an effect should also define how the player gets back to the ordinary state.

Page 40 of 93Permalink
Go to page