particles.setSpeed

Section: Particles

What it does

particles.setSpeed sets Speed on a particles object. It takes id, min and max.

Signature

particles.setSpeed(id, min, max)

Arguments

  • id
  • min
  • max

Example · generated

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

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

14 members in particles