GPU Particles

self:set_amount

Client

Sets the number of particles emitted per cycle

Syntax

local status = self:set_amount(
    amount
)

Changing the amount restarts the emitter.

  • All live particles are cleared when the amount changes.

Parameters

TypeNameDescription
intamountNumber of particles, at least 1

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the particle amount
local entity = particle.gpu.create()

entity:set_amount(60)

On this page