- Documentation
- Shared functions
- isParticleEmitterEnabled
Function
isParticleEmitterEnabled
Checks whether the emitter releases new particles.
Syntax
bool isParticleEmitterEnabled(element emitter)Arguments
emitterelement- The emitter.
Returns
true if enabled.
Example
Toggles a campfire with the F key: it goes out or burns again.
local x, y, z = getElementPosition(localPlayer)
local fire = createParticleEmitter(x + 2, y, z - 1, "fire")
bindKey("f", "down", function()
setParticleEmitterEnabled(fire, not isParticleEmitterEnabled(fire))
end)