- Documentation
- Shared functions
- burstParticles
Function
burstParticles
Releases the given number of particles at once, regardless of rate: an explosion, a hit, a burst of confetti.
Syntax
bool burstParticles(element emitter, int count)Arguments
emitterelement- The emitter.
countint- Number of particles (1 to 2000).
Returns
true on success.
Example
Confetti on a command; the emitter releases nothing by itself.
local x, y, z = getElementPosition(localPlayer)
local party = createParticleEmitter(x, y, z, "confetti", { rate = 0 })
addCommandHandler("party", function()
burstParticles(party, 400)
end)
See also
createParticleEffectA short effect: the emitter releases particles for the given time and removes itself once the last one fades. No need to destroy it. On the server, every player nearby sees the effect.setParticleEmitterEnabledStarts or pauses releasing new particles. A disabled emitter lets the particles already released live out their life; enabling it again restarts thedurationtime.