GPU Particles

self:set_one_shot

Client

Sets whether the emitter emits a single cycle and then stops

Syntax

local status = self:set_one_shot(
    state
)

Parameters

TypeNameDescription
boolstatetrue to emit a single cycle, false to emit continuously

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Make an emitter one-shot
local entity = particle.gpu.create()

entity:set_one_shot(true)

On this page