Emitter Systems | Index
Particle systems with QuakeC - packet overflows made easy! |
These were modeled after particle systems in high-end 3D apps, they are not the most user friendly entities around... |
Emitters generate a "particle" (either a .spr, .mdl or .bsp) and toss it in a direction between the set angle limits. They can use an optional "death" model to simulate anything from rain, falling rubble, blasts of flames, forcefields, whatever... Note that these have absolutely nothing to do with Quake's built-in particle system. When the word "particle" is used on this page, it refers an instance of the model assigned to the emitter. |
Effectors change the behaviour of particles that touch them (the emitter must have the "USEEFFECTORS" spawnflag set). |
Emitters can be attached to a func_train_ext, for some really neat shit :) |
Don't go too nuts with these, stay away from the built-in sounds for high frequency emitters (use fx_sound instead) and just use common sense (you don't need a gib fountain around every corner!). |
There are a LOT of options - these are really generic and need to be tailored to specifc purposes. |
The lifespan of animated particles may not be exact - it will always fall on a multiple of the framerate (this usually isn't a problem, since framerates are typically much smaller than lifespans) but you should be aware of this limitation. |
Particles won't "die" when they hit another particle - this is on purpose. |
Particles don't register a touch on water, but a t_effector_destroy trigger can be used to simulate this. Set KILLINFWATER to have them die in func_water* volumes. |
The angle limits may take a while to get used to, but it's a really powerful way to control the direction and spread. Start by setting just v1 and h1 to get a tight stream in the general direction, then adjust v1/v2 and h1/h2 to within a few degrees (plus and minus) of the original value to increase the spread for a cone-shaped fountain. Ommit either h2 or v2 for a fan shaped emission, or set v1=1 v2=360 h1=1 h2=360 for a fire-works style spherical burst. | |||
|
|||
The particle spread is always contained from the first angle (h1/v1) to the second angle (h2/v2), going clockwise. So h1=10 h2=350 is NOT the same as h1=350 h2=10. (the first is a near circular spread, while the second is a tight 20º fan shaped spread). | |||
Also note that although 0 would normally be a valid replacement for 360, you should use a range of 1 - 360 as a value of 0 is simply ignored (though this may be desirable in certain situations). |
func_emitter emits particles from a fixed point while func_emitter_volume emits particles from a random spot within a brush volume. |
wait | Delay between particle emissions (-1 is a single burst, then pause) |
wait2 | If set, delay is a random number between "wait" and "wait2" (unless "wait" is -1) |
ppe | Particles per emission (default is 1). |
h1 | Toss particles along this horizontal (yaw) angle (1º - 360º) |
h2 | If set, tossess particles along a random horizontal angle between "h1" and "h2" |
v1 | Toss particles along this vertical (pitch) angle (1º - 360º) 270 is up, 90 is down. |
v2 | If set, tossess particles along a random vertical angle between "v1" and "v2" |
avelocity | X Y Z emitter angle velocity (IMPORTANT: rotates after each emittion, this is NOT time based!) |
noise | Noise the emitter makes when spawning a new particle (USE WITH CAUTION WITH HIGH FREQUENCY EMITTERS!) |
target | Attach the emitter to a func_train_ext |
targetname | Can be triggered on/off |
style | Particle movetype: MOVETYPE_BOUNCE (10), MOVETYPE_TOSS (6), MOVETYPE_FLY (5) or MOVETYPE_NONE (0) |
speed | Speed of the particles |
speed2 | If set, speed is a random number between "speed" and "speed2" |
lspan | Life span of particles in seconds |
lspan2 | If set, life span is a random number between "lspan" and "lspan2" |
mdl | Path to the sprite or model file to use as particles |
frame | Start frame (model/sprite frame) |
nfrms | Number of animation frames |
frate | Override the default 10fps (0.1) animation rate |
gravity | Alter gravity G = sv_gravity*self.gravity (NOTE: 0 or 1 is unaltered - use 0.001 for "zero G" or better yet, set "style" to MOVETYPE_FLY) |
dmg | Damage particles do when they hit something |
effects | EF_MUZZLEFLASH (2), EF_DIMLIGHT (8), EF_BRIGHTLIGHT (4), or EF_BRIGHTFIELD (1) |
noise1 | Noise particles make when they hit something (USE WITH CAUTION WITH HIGH FREQUENCY EMITTERS!) |
noise2 | Noise particles make when they die (USE WITH CAUTION WITH HIGH FREQUENCY EMITTERS!) |
message | Death message if player is killed by a particle |
weapon | If "dmg" is set (and positive) a particle acts like a projectile and spawns blood/sparks when doing damage or this TE_ effect when hitting the world. (from 0 - 11) TE_SPIKE, TE_SUPERSPIKE, TE_GUNSHOT, TE_EXPLOSION, TE_TAREXPLOSION, TE_LIGHTNING1, TE_LIGHTNING2, TE_WIZSPIKE, TE_KNIGHTSPIKE, TE_LIGHTNING3, TE_LAVASPLASH, TE_TELEPORT (use -1 for no effect, default is TE_SPIKE) |
mdl2 | Path to the sprite or model to become when life span expires (optional - just remove if not set) |
nfrms2 | Number of animation frames for "death" animations |
frate2 | Override the default 10fps (0.1) animation rate for the "death" model |
1 : START_ON | Emitters with targetnames will wait for a trigger event unless this is set |
2 : EMITSOLID | Particles are solid, block players, and collide with each other |
4 : REMOVEONTOUCH | Remove particles (or do death animation) on touch |
8 : DIEAFTERANIM | Remove particles (or do death animation) after reaching the last animation frame (loop animation otherwise) |
16 : SPINPARTICLES | Gives particles semi-random angle velocity (doesn't affect parallel sprites) |
32 : STAGGERFRAMES | Each new particle begins with the next sequential animation frame (NOTE: DIEAFTERANIM will still kill it after the absolute "last" frame) |
64 : KILLINFWATER | Remove particles (or do death animation) when in contact with func_water |
128 : USEEFFECTORS | Partciles generated by this emitter are affected by effector triggers |
256 : STARTSTOPPED | Emitter won't spin until it's used by a trigger_go/reverse/forward (only affects emitters with avelocity) |
Kills particles that touch it |
count | Override the default 100% obliteration (valid: 1-99 i.e 50 affects roughly 50% of the particles) |
targetname | Can be enabled/disabled |
1 : START_ON | Start in enabled state even if targeted |
Pushes particles in a new direction |
mangle | X Y Z speed |
cnt | Percentage of original particle velocity to diminish |
count | Override the default 100% of particles affected (valid: 1-99 i.e 50 affects roughly 50% of the particles) |
targetname | Can be enabled/disabled |
1 : START_ON | Start in enabled state even if targeted |
16 : TANGENENTAL | Particles turn to face new direction |
Pushes particles at random speeds in all directions (can exlude certain axii) |
speed | Max amount of turbulence |
cnt | Percentage of original particle velocity to diminish |
count | Override the default 100% of particles affected (valid: 1-99 i.e 50 affects roughly 50% of the particles) |
targetname | Can be enabled/disabled |
1 : START_ON | Start in enabled state even if targeted |
2 : NOT_X | Don't affect X direction |
4 : NOT_Y | Don't affect Y direction |
8 : NOT_Z | Don't affect Z direction |
16 : TANGENENTAL | Particles turn to face new direction |
Modifies particle gravity |
gravity | Add this to current gravity value, or change to this value if "ABSOLUTE" is set |
count | Override the default 100% of particles affected (valid: 1-99 i.e 50 affects roughly 50% of the particles) |
targetname | Can be enabled/disabled |
1 : START_ON | Start in enabled state even if targeted |
2 : ABSOLUTE | Particles use new gravity outright |
Particles touching this trigger are attracted to it's centre. Can also repel particles with negative strength. This works best with particles that have a low gravity setting or are MOVETYPE_FLY. |
speed | Strength of the attraction |
cnt | Percentage of original particle velocity to diminish |
count | Override the default 100% of particles affected (valid: 1-99 i.e 50 affects roughly 50% of the particles) |
targetname | Can be enabled/disabled |
1 : START_ON | Start in enabled state even if targeted |
16 : TANGENENTAL | Particles turn to face new direction |
Applies friction to particles, slowing them down (negative values speed particles up) |
speed | Amount of Friction (max 100 = dead stop, negative values can go further though -200 etc.) |
count | Override the default 100% of particles affected (valid: 1-99 i.e 50 affects roughly 50% of the particles) |
targetname | Can be enabled/disabled |
1 : START_ON | Start in enabled state even if targeted |