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

Function

setParticleEmitterSettings

Server and clientParticlesTrilogy Hub only

Changes chosen settings of a running emitter (the same fields as in createParticleEmitter), the rest stays. Living particles pick up the new colour and size immediately.

Syntax

bool setParticleEmitterSettings(element emitter, table settings)

Arguments

emitterelement
The emitter.
settingstable
Fields to change.

Returns

true on success.

Example

Fire that turns into a blue flame.

setParticleEmitterSettings(fire, {
    colors = { tocolor(120, 180, 255), tocolor(40, 80, 255, 0) },
    rate = 90,
})

See also