Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

particle

From Quake Wiki

Revision as of 15:20, 1 August 2023 by Boondorl (talk | contribs) (Created page with "''void'' '''particle'''(''vector'' pos, ''vector'' vel, ''float'' color, ''float'' amount) == Usage == Spawns particles at the given position. These have a brief lifetime of...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

void particle(vector pos, vector vel, float color, float amount)

Usage[edit]

Spawns particles at the given position. These have a brief lifetime of roughly 0.1 to 0.5 seconds.

Parameters[edit]

  • pos
The spawn point of the particles. This gets slightly randomized.
  • vel
The velocity to give to the particles in map units/second. This is multiplied by 15.
  • color
The index of the color in the color palette. This gets randomized slightly. Valid range is [0, 255].
  • amount
The amount of particles to spawn. If 255 is passed, spawns a special series of randomized explosion particles.

Example[edit]

// On impact with the ground, this missile fires a series of brown particles upward
if (checkbottom(self))
    particles(self.origin, '0 0 100', 16, 25);