- Documentation
- Shared functions
- setParticleEmitterSettings
Function
setParticleEmitterSettings
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
getParticleEmitterSettingsReturns a copy of the emitter's settings. You can change it and pass it back tosetParticleEmitterSettings.createParticleEmitterCreates an emitter of moving particles simulated by the game: fire, smoke, sparks, snow, portals and anything you build from the settings. The fourth argument is a preset name or a settings table, the fifth overrides chosen fields of the preset. Returns a"particle"element that can be moved, attached and destroyed like any other. Called on the server, it creates an emitter every player sees.