Particle effects with asw_emitter
Alien Swarm has its own special kind of particle system aside from the PCF system. The effects generated through this method aren't as advanced but are simpler to work with.
Getting to the editor[edit | edit source]
In your map, place an asw_emitter
entity. Leave Starts on as Yes and leave Template as Default. Compile the map, set sv_cheats 1
and type ASW_EditEmitterFrame
in the console.
Editor functions[edit | edit source]
The editor that pops up will take control the effect emitted by the asw_emitter
. What follows is a walkthrough of all the settings. When you're done creating your effect, click the Save button and you will be prompted to give the effect a name.
Tip: Numbers can be entered manually by clicking on them and using your keyboard.
Template[edit | edit source]
A premade particle effect. The files listed may be found in Alien Swarm/swarm/resource/particletemplates/
.
Material[edit | edit source]
How the individual parts of the particle effect look. Confirm: Materials with $vertexalpha 1
and $vertexcolor 1
are automatically added to this list.
Particles per second[edit | edit source]
How many particles may spawn in a second.
Particle supply[edit | edit source]
If set, the emitter will only spawn this many particles before shutting itself off.
Lifetime[edit | edit source]
Particles will exist for a random time between the Min and Max number of seconds.
Presimulate time[edit | edit source]
To do: Uncertain.
Start roll[edit | edit source]
Particles will spawn with a random rotation between the Min and Max number of degrees offset.
Roll rate[edit | edit source]
Particles will rotate with a random speed between the Min and Max number of degrees per second.
Start Position Min/Max[edit | edit source]
Particles will spawn with a random offset from the emitter origin between the minimum and maximum XYZ offsets, in world units.
Velocity Min/Max[edit | edit source]
Particles will spawn with a random velocity between the minimum and maximum XYZ speeds, in world units per second.
Acceleration Min/Max[edit | edit source]
Particles will accelerate over their lifetime by a random amount between the minimum and maximum XYZ amounts, in world units per second, per second.
Gravity[edit | edit source]
Particles will obey gravity by accelerating this much. If the Z acceleration is exactly opposite of this number, the particle won't move anywhere on the Z axis. To do: How does this interact with existing gravity functions like sv_gravity
and trigger_gravity
?
Local movement[edit | edit source]
To do: Uncertain.
Collision[edit | edit source]
Controls what the particles can collide with. Note that collision can cause performance issues if done copiously.
- None - Travels through all objects.
- Brush - Collide only with brushes.
- All - Collide with all objects, even players and NPCs.
Velocity retained on collision[edit | edit source]
If a particle comes into contact with something it should collide with, it will bounce off that surface and retain this much of its previous speed.
Life lost on collision[edit | edit source]
If a particle comes into contact with something it should collide with, it will lose this many seconds of its lifetime.
Collision sound[edit | edit source]
If a particle comes into contact with something it should collide with, it will play this soundscript.
Collision decal (unnamed)[edit | edit source]
If a particle comes into contact with something it should collide with, it will create this decal on the surface. GreenBlood
and Scorch
are known valid strings. To do: What decals are usable?
Spawn particles on collision[edit | edit source]
If a particle comes into contact with something it should collide with, it will spawn this particle.
Particles spawn children[edit | edit source]
If set, particles will also spawn with this particle effect attached to them.
Freq.[edit | edit source]
How frequently particles get spawned through Particles spawn children. To do: Exactly how is this measured?
Glow Material[edit | edit source]
An additional effect to spawn alongside the Material to act as a glow effect.
Dev.[edit | edit source]
Maximum amount that the Glow Material may deviate from the angle traveled by the Material sprite. 100 translates to a 180 degree range.
Scale[edit | edit source]
Size of the Glow Material sprite.
Draw Type[edit | edit source]
Draws the particles as sprites or as a beam/beams.
Beam Length[edit | edit source]
How much to elongate the sprites when drawing as a beam.
Beam Positioning[edit | edit source]
Where the beam's origin is.
- Behind - Good for beam/laser shots.
- Center - Good for spark effects.
- Front
Scale Beam by Velocity[edit | edit source]
Elongates the beam more when it's moving faster.
Scale Beam by life left[edit | edit source]
Shortens the beam as it loses life.
Lighting Type[edit | edit source]
To do: Uncertain. This seems to not have anything to do with actual lighting.
- Scale Color
- Scale Alpha
- Scale Alpha+Color
Lighting Apply[edit | edit source]
How much to scale the property specified in Lighting Type.
Alpha, Size, and Color[edit | edit source]
These three settings are able to fade between different values across their lifetime. The first Value will be the particle's respective value from when when it spawns to a percent of its life defined by the first Time. After that percent of its life is over, the value will fade to the amount in the second Value, and finish fading at the second Time. The third set of numbers does the same to the second set, and so on. Once the lifetime reaches the time of the last settings in use, those settings will persist until the particle dies.
These can be used for very complex effects like rainbows.
Saving and using the effect[edit | edit source]
Once you've tuned your effect to your liking, click the Save button near the top and give it a name. Go back to Hammer, and put that same name into the Template text field.
Here's some effects you can do: