Particles

From ZDoom Wiki
(Redirected from Particle)
Jump to navigation Jump to search

Particles are very simple objects (much simpler than actors) that are used by ZDoom for several special effects:

Since they are extremely simple, the engine can supports displaying thousands of particles at once.

Authors can also spawn their own particles, using ZScript, DECORATE or ACS, as described below.

Functions

There are several ways to spawn particles and define their appearance:

  • A_SpawnParticle is a function available in ZScript and DECORATE that allows spawning particles with custom color, size, position, velocity and other parameters.
  • A_SpawnParticleEx is a ZScript-only function. In contrast to A_SpawnParticle, this extended function allows attaching a graphic to particles, thus giving them custom appearance, which can potentially be very effective for creating effects like debris, smoke and others. It also allows giving the particles rotation and animation.
  • SpawnParticle (ZScript) is a ZScript-only struct-using version of A_SpawnParticle.
  • SpawnParticle is an ACS function with capabilities similar to A_SpawnParticle.

Console variables

The following console variables affect particles:

Colors

The default non-textured particles can have one of the following colors:

  1. ██ black
  2. ██ blue
  3. ██ blue1
  4. ██ dred
  5. ██ green
  6. ██ green1
  7. ██ grey1
  8. ██ grey2
  9. ██ grey3
  10. ██ grey4
  11. ██ grey5
  12. ██ maroon1
  13. ██ maroon2
  14. ██ orange
  15. ██ purple
  16. ██ purple1
  17. ██ rblue1
  18. ██ rblue2
  19. ██ rblue3
  20. ██ rblue4
  21. ██ red
  22. ██ red1
  23. ██ yellow
  24. ██ yellow1
  25. ██ yorange
  26. ██ white