From ZDoom Wiki
Jump to: navigation, search

void SpawnParticle (int color [, bool fullbright [, int lifetime [, int size [, fixed x [, fixed y [, fixed z [, fixed velx [, fixed vely [, fixed velz [, fixed accelx [, fixed accely [, fixed accelz [, int startalpha [, int fadestep]]]]]]]]]]]]]]);


Spawns a single particle at the x, y and z coordinates.


  • color: The color of the particle. This is a hexadecimal value, e.g. 0xFF0000 (which is bright red).
  • fullbright: If true, it renders the particle fully bright. Default is false.
  • lifetime: The lifetime of the particle in tics. This ranges from 0 to 255. Default is 35.
  • size: The size of the particle, up to a maximum value of 65535. Default is 1.
  • x/y/z: The absolute map coordinates at which to spawn the particle. Default is 0.
  • velx/vely/velz: The velocity along the x/y/z axis. This is in absolute direction, not relative. Default is 0.
  • accelx/accely/accelz: Defines how much to accelerate this particle by over its lifespan. Default is 0.
  • startalpha: Specifies the alpha upon spawning. This ranges from 0 to 255. Default is 255.
  • fadestep: The amount the particle fades each tic. This ranges from -1 to 255, with -1 indicating automatic mode (a complete fadeout over the length of lifetime). The particle is automatically removed early if it fades completely before lifetime expires. Default is -1.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.