GPU Particles

self:restart

Client

Restarts the emitter, clearing every live particle

Syntax

local status = self:restart()

Fires particle:emit as the new cycle starts.

  • Fires on every call, even if the emitter was already emitting, because a new cycle begins each time.
  • Every live particle is cleared and the cycle starts again from the beginning.
  • Use it to replay a one-shot emitter straight after particle:finished.

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Restart the emitter
local entity = particle.gpu.create()

entity:emit()
entity:restart()

On this page