S W A T 3 M O D H Q |
ADVANCED TOPIC - CLOSE WINDOW WHEN FINISHED |
Internal FX, Special Identifiers
Automatic FX Naming
In general, effects are not spawned manually; they are spawned automatically based on certain game events. To identify a certain game event as one worthy of spawning effects, special naming conventions must be used. Out of the three fields that uniquely identify an effect: Name, Class, and Parameters, the Name field is used to give these special identifiers to effects, queuing them to automatically play when game events trigger them.
Shown below are the special identifiers you can give in the Name field and a short description:
<footsteptype>_<foot>_<material> |
This particular event is activated when a characters first few footsteps are generated after leaving the specified material. This can create events such as muddy footprint decals, etc. "sneaker_left_liquid" will trigger for the first couple of footsteps when the left foot of a character with footstep type "sneaker" has just left material type "liquid". |
Gunsmoke_<gun> |
This particular event is triggered when the gun specified is fired. This can be used to create smoke, etc. |
bullet_<material> |
This event is triggered when a bullet of any type hits the specified material. |
bullet_splat_<color> |
This event is triggered when a paintball of the specified color explodes on something. |
shell_<ammotype> |
This event is triggered when a gun ejects a shell casing of the specified ammo type. |
<gun>_mag |
This event is triggered when the user of the gun ejects an empty magazine. This is typically tied to a MagazineEffect to generate the empty magazine that then falls to the ground. |
<ammotype>_shoot |
This event is triggered when the specified ammo type is fired from any gun. This works with both standard and the new throwable ammo types. |
<ammotype>_hitsolid |
This effect is produced when a bullet from the specified ammo type hits a solid surface. This does not apply to throwable ammunition. |
<ammotype>_hitchar |
This effect is produced when a bullet from the specified ammo type hits a character. This does not apply to throwable ammuntion. |
Positions/Directions
Almost every effect has a position; the placement of these positions are automatic, and are tied in with the type of object that generates the effect:
Guns |
Effect is centered on the gun |
Bullet Impacts |
Effect is centered on the center of the impact |
Grenades |
Effect is centered on the center of the grenade |
Map Entities |
Effect is centered on the entity |
Note that effects that are spawned by moving entities do not continue to move with that entity once they enter the game world.
Some effects also have directions. This applies to effects such as TracerEffect and LaserEffect. The directions rely on the orientation of the object that spawned them, with two exceptions:
Effects produced by an Info_Effect entity in the game map will orient in the direction of the "Target" entity specified in the properties of the Info_Effect entity.
Effects produced by a Trigger entity within a map can be oriented by specifying a vector in the Parameters list of the effect called "dir", i.e. dir=0 1 0 .
Detail-Specific Effects
If you plan to create large or complex effects, you may want to create scaled-down versions so that SWAT3 players who have their detail set to Medium or Low do not get bogged down by complex effects. Any effect name, including those that use the special naming conventions mentioned above, can have _medium or _low appended at the end to specify that the effect play in medium or low detail modes, respectively. If the user is in medium or low detail mode and the effects do not have _medium or _low versions, SWAT3 will use the regular effect. Note that these detail-specific effects should be in addition to the standard effect.