GPU Particles

self:burst

Client

Emits a single cycle of particles

Syntax

local status = self:burst()

Fire-and-forget effects need cleaning up.

  • Listen for particle:finished and call self:destroy from it — it fires once every particle of the cycle is gone.
  • particle:emit fires as soon as the burst starts.
  • Switches the emitter to one-shot, so it plays a single cycle and then stops.

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Emit a single cycle
local entity = particle.gpu.create()

entity:set_one_shot(true)
entity:burst()
Burst and clean up
local entity = particle.gpu.create()

util.event.on("particle:finished", function(emitter)
    emitter:destroy()
end)

entity:burst()

On this page