particles.setLifeTime

Section: Particles

What it does

particles.setLifeTime sets LifeTime on a particles object. It takes id, min and max.

Signature

particles.setLifeTime(id, min, max)

Arguments

  • id
  • min
  • max

Example · generated

function start() {  particles.create('main', 10);  particles.setLifeTime('main', 0, 1);}

particles.create is there to give the call something to act on; particles.setLifeTime is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.

14 members in particles