GPU Particles

self:set_lifetime_randomness

Client

Sets how much the lifetime of each particle varies

Syntax

local status = self:set_lifetime_randomness(
    ratio
)

Parameters

TypeNameDescription
floatratioLifetime randomness between 0 and 1

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Vary particle lifetimes
local entity = particle.gpu.create()

entity:set_lifetime_randomness(0.4)

On this page