Particles
(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:
- Missile trails behind actors with the GRENADETRAIL or ROCKETTRAIL flags.
- Helix trail around railgun attacks.
- Red, green, blue, yellow, purple, black or white particle fountains actors.
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:
- cl_rockettrails
- cl_bloodtype
- cl_pufftype
- r_maxparticles
- r_rail_smartspiral
- r_rail_spiralsparsity
- r_rail_trailsparsity
- gl_particles_style (OpenGL only: not supported by ZDoom)
Colors
The default non-textured particles can have one of the following colors:
- ██ black
- ██ blue
- ██ blue1
- ██ dred
- ██ green
- ██ green1
- ██ grey1
- ██ grey2
- ██ grey3
- ██ grey4
- ██ grey5
- ██ maroon1
- ██ maroon2
- ██ orange
- ██ purple
- ██ purple1
- ██ rblue1
- ██ rblue2
- ██ rblue3
- ██ rblue4
- ██ red
- ██ red1
- ██ yellow
- ██ yellow1
- ██ yorange
- ██ white