GPU Particles

self:set_lifetime

Client

Sets how long each particle lives

Syntax

local status = self:set_lifetime(
    seconds
)

Parameters

TypeNameDescription
floatsecondsParticle lifetime in seconds, at least 0.01

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_lifetime(4)

On this page