ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isParticleEmitterEnabled

Function

isParticleEmitterEnabled

Server and clientParticlesTrilogy Hub only

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)

See also