EntitiesTriggers
trigger_camerause
 
Description
 
Trigger brush. Activates the targeted camera's view when used. Once used, pressing the use key again will cycle through camera views in round-robin fashion.
 
Keys
 
target:
points to targetname of the camera (func_camera or func_securitycamera) to activate.
alpha:
sets the translucency of the entity if VISIBLE is set (default 1.0).
targetname:
name refered to when controlled by script.

Spawnflags
 
1
VISIBLE
trigger brush will be both visible and solid.
8
MONSTERS
the trigger will respond to monsters.

Notes

The easiest and most efficient way to use this is to draw a brush the size you wish and texture it with some kind of "monitor screen" type of texture, make it a trigger_camerause and set the VISIBLE spawnflag. This way, the brush will both look like a screen and will fill the role of the trigger at the same time.

For more detailed info on cameras, please refer to the func_camera and func_securitycamera entities info sheets.


trigger_changelevel
 
Description
 
Solid class. When the player touches this, he gets sent to the map listed in the "map" key. In deathmatch, the view will go to the info_intermission spot (if one exists) and display stats.
 
Keys
 
map:
name of next .bsp file (no extension) to load. To clear all save game data from previous levels, precede the name of the map with a '*' character. If you want the player to start in a specific location in the next map, follow the map name with the targetname of the info_player_start entity located where you want him to start. For example, if the name of the map is "mymap.bsp" and the targetname of the info_player_start is "spot1", set the "map" key to "*mymap$spot1".
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
this defaults to "LevelComplete" and should point to a thread that is called just before the level ends.
targetname:
name refered to when controlled by script.

Spawnflags
 
1
NO_INTERMISSION
skip the info_intermission view.
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.
16
PROJECTILES
the trigger will respond to projectiles (rockets, grenades, mines).

Notes


trigger_damagetargets
 
Description
 
Solid class. This will inflict damage to its targets when activated by another trigger and/or shot at if SOLID is set (cannot be touch activated). When transferring damage to the targets by hurting the trigger, none of the other keys (damage, cnt, message, key, thread) are active.
 
Keys
 
target:
this points to the entities on which to inflict or transfer the damage.
targetname:
used for triggering by another trigger or a script.
damage:
amount of damage to inflict. If no damage is specified, objects are damaged by the current health +1 (this makes sure that they are destroyed).
cnt:
how many times trigger can be activated before removing itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.

Spawnflags
 
1
SOLID
trigger will be solid and damage its targets by the same amount inflicted to it.
4
NOT_PLAYERS
the trigger does not hurt players.
8
NOT_MONSTERS
the trigger does not hurt monsters.
16
PROJECTILES
the trigger will hurt projectiles (rockets, grenades, mines).

Notes


trigger_damagetargetsfixed
 
Description
 
Point class. This is the same as trigger_damagetargets except it's a fixed size version. Since no brush can be tied to it, it can't transfer damage to its targets because it can't be hurt (even if SOLID is set). Must be activated by another trigger.
 
Keys
 
target:
this points to the entities on which to inflict or transfer the damage.
targetname:
used for triggering by another trigger or a script.
damage:
amount of damage to inflict. If no damage is specified, objects are damaged by the current health +1 (this makes sure that they are destroyed).
cnt:
how many times trigger can be activated before removing itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.

Spawnflags
 
1
SOLID
serves no other purpose than to make trigger solid. Useless.
4
NOT_PLAYERS
the trigger does not hurt players.
8
NOT_MONSTERS
the trigger does not hurt monsters.
16
PROJECTILES
the trigger will hurt projectiles (rockets, grenades, mines).

Notes


trigger_damagethreshold
 
Description
 
Solid class. When this trigger receives damage above a certain value, it will trigger its target(s). By default, the inflicted damage is not cumulative and has to be inflicted all in one shot. This can be used for things that have to be shot by a powerful enough weapon to be activated. When used in conjunction with func_breakawaywall, this allows to make walls that have to be destroyed with a rocket blast for example. Will also trigger any targeted func_areaportals when not invisible.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
health:
minimum amount of one-shot damage to inflict for the trigger to activate its targets (default 60).
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (-1 specifies infinite firing, default is 1).
message:
text string to print on the screen when the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
alpha:
sets the translucency of the entity if INVISIBLE is NOT set (default 1.0).
targetname:
name refered to when controlled by script.

Spawnflags
 
2
INVISIBLE
trigger will still be solid but not visible.
4
NOT_PLAYERS
the trigger will not respond to damage caused by players.
8
MONSTERS
the trigger will respond to damage caused by monsters.
16
ACCUMULATIVE
damage to inflict is cumulative instead of threshold based.

Notes


click for full size image in pop-up window trigger_exit
 
Description
 
Solid class. When the player touches this, an animated exit icon will be displayed on his hud. This is to inform him that he is near an exit.
 
Keys
 
targetname:
name refered to when controlled by script.

Spawnflags
 
None

Notes

This entity does not make the player exit the map. It is just intended to be used to give the player a visual hint that he is near an exit. For the player to exit the map into a next map, the trigger_changelevel entity is required. Simply place this entity close to the trigger_changelevel.


trigger_hurt
 
Description
 
Solid class. Inflicts damage to the player and monsters when touched.
 
Keys
 
damage:
amount of damage to inflict when touched.
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
targetname:
name refered to when controlled by script (see notes below).

Spawnflags
 
4
NOT_PLAYERS
the trigger does not hurt players.
8
NOT_MONSTERS
the trigger does not hurt monsters.
16
PROJECTILES
the trigger will hurt projectiles (spider mines only).

Notes

The damage value of this trigger can be modified in the course of the game by using the following command:

$hurttrigger setdamage <value>


trigger_lightramp
 
Description
 
Point class. Ramps light values on surface based light sources from one level to another when triggered. By default, it will ramp from "startlevel" to "endlevel" once when triggered and remain at that level even if triggered again (unless TOGGLE is set). The brush faces controlled by this must have the 'light' surface flag and a 'direct value' set in surf inspector.
 
Keys
 
style:
set this to brush faces 'group' name in surface inspector (default 0).
time:
how many seconds the ramping will take (default 1.0).
startlevel:
value between 0 and 2.0 (default 1).
endlevel:
value between 0 and 2.0 (default 0).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
targetname:
name used by trigger or script to activate this.

Spawnflags
 
1
TOGGLE
surface light will alternately ramp up and ramp down each time it's triggered.

Notes


trigger_multiple
 
Description
 
Solid class. Repeatable trigger that fires its targets when touched or killed. Can also call a script thread.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
health:
if this is set, trigger must be killed instead of touched to be activated (this also makes the trigger solid).
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
targetname:
name refered to when controlled by script.

Spawnflags
 
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.
16
PROJECTILES
the trigger will respond to projectiles (rockets, grenades, mines).

Notes


trigger_mutate
 
Description
 
Solid class. This will transform players into a mutant when touched or killed. Common trigger keys also work. Monsters can activate trigger but are not transformed into mutants.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
health:
if this is set, trigger must be killed instead of touched to be activated (this also makes the trigger solid).
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
alpha:
sets the translucency of the entity if VISIBLE is set (default 1.0).
targetname:
name refered to when controlled by script.

Spawnflags
 
1
VISIBLE
trigger brush will be both visible and solid.
4
NOT_PLAYERS
players can't activate trigger.
8
NOT_MONSTERS
monsters can't activate trigger.

Notes


trigger_once
 
Description
 
Solid class. Trigger which fires its targets when touched or killed. Can also call a script thread. Triggers once, then removes itself.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
health:
if this is set, trigger must be killed instead of touched to be activated (this also makes the trigger solid).
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
message:
text string to print on the screen when the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
targetname:
name refered to when controlled by script.

Spawnflags
 
1
NOTOUCH
this makes the trigger non-solid when "health" is set.
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.
16
PROJECTILES
the trigger will respond to projectiles (rockets, grenades, mines).

Notes


trigger_particles
 
Description
 
Point class. Particle generator entity. Spawns particles each time it is triggered.
 
Keys
 
targetname:
name used by trigger or script to activate this.
angles:
pitch, yaw, roll direction in which to spawn particles (default 0 0 0).
count:
number of particles to spawn each time this is triggered (default 10).
particlestyle:
style of particles. Possible styles as defined in global/global0.scr are:
    120 :gunsmoke
    121 :blood
    122 :sparks (default)
    123 :orangeglow
    124 :blueyellow
    125 :debris trail
    126 :weird bubblegum
    127 :blood2
    128 :oil
    129 :water spray
    130 :blue - yellow - blue
    131 :blue fade
noise:
path/name of .wav file to play when triggered (defaults to random spark sounds).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon

Spawnflags
 
2
NOSOUND
no sound will be played when particles are spawned.
4
NOT_PLAYERS
activating trigger will not respond to players.
8
MONSTERS
activating trigger will respond to monsters.
16
PROJECTILES
activating trigger will respond to projectiles (rockets, grenades, mines).
32
RANDSTYLE
the particles will be set to random colors in the particlestyle.
64
BRIGHT
particles will be drawn extra bright.

Notes


trigger_push
 
Description
 
Solid class. Pushes players, monsters, actors and projectiles as if they were caught in a heavy wind when touched.
 
Keys
 
speed:
speed at which the entities are pushed (default 1000).
angle:
indicates the angle of push (horizontal: 0 - 360, -1 is up, -2 is down).
target:
this will trigger the entity it points to (if triggerable) and use it as an aiming point (overrides "angle"). Setting this also has an effect on the resulting speed and angle of push which is then based on a combination of the value of the "speed" key, the position of the targeted entity (overrides "angle") plus the angle of approach and speed of collision of the player with the trigger: the faster the player walks into the trigger brush, the stronger the push.
killtarget:
any entities this points to will be removed when the trigger is fired.
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
targetname:
name refered to when controlled by script.

Spawnflags
 
4
NOT_PLAYERS
the trigger will not push players.
8
NOT_MONSTERS
the trigger will not push monsters.
16
NOT_PROJECTILES
the trigger will not push projectiles (rockets, grenades, mines).

Notes


trigger_pushany
 
Description
 
Solid class. This is the same thing as a trigger_push but will push entities in any direction set by "angles".
 
Keys
 
speed:
speed at which the entities are pushed (default 1000).
angles:
pitch, yaw, roll direction in which to push entities (default 0 0 0).
target:
this will trigger the entity it points to (if triggerable) and use it as an aiming point (overrides "angles"). Setting this also has an effect on the resulting speed and angle of push which is then based on a combination of the value of the "speed" key, the position of the targeted entity plus the angle of approach and speed of collision of the player with the trigger: the faster the player walks into the trigger brush, the stronger the push.
killtarget:
any entities this points to will be removed when the trigger is fired.
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
targetname:
name refered to when controlled by script.

Spawnflags
 
4
NOT_PLAYERS
the trigger will not push players.
8
NOT_MONSTERS
the trigger will not push monsters.
16
NOT_PROJECTILES
the trigger will not push projectiles (rockets, grenades, mines).

Notes


trigger_randomparticles
 
Description
 
Point class. Random particle generator entity. This will spawn particles at random time intervals when triggered.
 
Keys
 
targetname:
name used by trigger or script to activate this.
angles:
pitch, yaw, roll direction in which to spawn particles (default 0 0 0).
count:
number of particles to spawn each time this is triggered (default 10).
particlestyle:
style of particles. Possible styles as defined in global/global0.scr are:
    120 :gunsmoke
    121 :blood
    122 :sparks (default)
    123 :orangeglow
    124 :blueyellow
    125 :debris trail
    126 :weird bubblegum
    127 :blood2
    128 :oil
    129 :water spray
    130 :blue - yellow - blue
    131 :blue fade
noise:
path/name of .wav file to play when triggered (defaults to random spark sounds).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
mindelay:
minimum delay between particle triggers (default 3).
maxdelay:
maximum delay between particle triggers (default 10).

Spawnflags
 
1
START_ON
particle effect will initially be on and turn off when triggered.
2
NOSOUND
no sound will be played when particles are spawned.
4
NOT_PLAYERS
activating trigger will not respond to players.
8
MONSTERS
activating trigger will respond to monsters.
16
PROJECTILES
activating trigger will respond to projectiles (rockets, grenades, mines).
32
RANDSTYLE
the particles will be set to random colors in the particlestyle.
64
BRIGHT
particles will be drawn extra bright.

Notes

The actual delay is calculated using 'mindelay', 'maxdelay' and a random factor. The particles will be spawned on the following time base:

( mindelay + randomvalue (maxdelay - mindelay) ) seconds.*

Where 'randomvalue' is a random floating point value between 0 and 1.

* Info courtesy of Mark Dochterman and Scott Alden, Ritual Entertainment.


trigger_randomspeaker
 
Description
 
Point class. This will play a sound at random time intervals when triggered. Don't use this with ambient looping sounds.
 
Keys
 
noise:
path/name of wav file to play.
channel:
channel on which sound is generated (has no effect on ambient sounds). Value ranges from 0 - 8.
    0 :auto channel (automatic).
    1 :weapon channel (sounds from weapons).
    2 :voice channel (talking - default).
    3 :item channel (items on player making sounds).
    4 :body channel (falling to the ground, landing, bodyfalls).
    5 :dialog channel (formal dialog).
    6 :secondary dialog channel (formal dialog).
    7 :weaponidle channel (sounds the player's weapon makes).
    8 :no PHS channel (don't use PHS).
volume:
loudness of sound (default 1). Value ranges from 0 - 4 (floating point). Volume has no effect on ambient sounds.
attenuation:
attenuation of sound with distance (0 becomes 1 for non-ambients, 2 for ambients).
    -1 :none, send to whole level.
     0 :default (normal or ambient).
     1 :normal fighting sounds.
     2 :idle monster sounds.
     3 :static attenuation (same as ambient sounds).
pitch:
the pitch of the sound (has no effect on ambient sounds). Value must be >0 (floating point). For example:
    0.5 :half speed.
    1.0 :normal speed (default).
    2.0 :double speed.
fadetime:
how long the sound takes to fade in seconds (has no effect on ambient sounds, default 0 - no fade).
timeofs:
offset time in milliseconds till the sound starts (has no effect on ambient sounds, 0 is default).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
targetname:
name used by trigger or script to activate this.
mindelay:
minimum delay between sound events (default 3).
maxdelay:
maximum delay between sound events (default 10).

Spawnflags
 
2
RELIABLE
this sound should be sent over in a reliable fashion (has no effect on ambient sounds). Should only be set for crucial voice-overs or sounds.
4
NOT_PLAYERS
activating trigger will not respond to players.
8
MONSTERS
activating trigger will respond to monsters.
16
PROJECTILES
activating trigger will respond to projectiles (rockets, grenades, mines).

Notes

The actual delay is calculated using 'mindelay', 'maxdelay' and a random factor. The sound will be generated on the following time base:

( mindelay + randomvalue (maxdelay - mindelay) ) seconds.*

Where 'randomvalue' is a random floating point value between 0 and 1.

For more information on ambient and normal sounds, please refer to the notes of the trigger_speaker entity.

* Info courtesy of Mark Dochterman, Ritual Entertainment.


trigger_relay
 
Description
 
Point class. This fixed size trigger cannot be touched, it can only be activated by other triggers and act as an intermediary to trigger other entities.
 
Keys
 
targetname:
activating trigger points to this.
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.

Spawnflags
 
4
NOT_PLAYERS
the trigger will not respond to events triggered by players.
8
MONSTERS
the trigger will respond to events triggered by monsters.
16
PROJECTILES
the trigger will respond to events triggered by projectiles (rockets, grenades, mines).

Notes


trigger_secret
 
Description
 
Solid class. Secret counter trigger. Automatically sets and increments script variables level.total_secrets and level.found_secrets. Will fire once and remove itself.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
health:
if this is set, trigger must be killed instead of touched to be activated (this also makes the trigger solid).
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation (defaults to "global/universal_script.scr::secret").
targetname:
name refered to when controlled by script.

Spawnflags
 
1
NOTOUCH
this makes the trigger non-solid when "health" is set.
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.
16
PROJECTILES
the trigger will respond to projectiles (rockets, grenades, mines).

Notes

When the map is loaded, all the trigger_secret entities in the map are counted and the total is stored in the level.total_secrets variable. The level.found_secrets variable is also automatically created and set to 0. Everytime one of these triggers is fired, level.found_secrets is incremented (level.total_secrets remains constant).


trigger_SetLightStyle
 
Description
 
Point class. Used for controlling surface based light sources. The brush faces controlled by this must have the 'light' surface flag and a 'radiosity' or 'direct value' set in surf inspector.
 
Keys
 
style:
set this to the brush faces 'group' name in surface inspector (default 0).
targetname:
name used by trigger or script to activate this. Will toggle between on and off states each time it's triggered.
on_style:
light style to set to when "on" (default is "m").
off_style:
light style to set to when "off" (default is "a").
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon

Spawnflags
 
1
START_OFF
the brush surfaces controlled by this will start in their off_style state.

Notes

To control surface based light sources, set the 'style' key to the name contained in the group field (surface properties) of the surfaces (brush faces) to control.

An example of the use of this entity can be seen in the game's Intro cinematic at the beginning of the game when you see the ceiling light fixture in JC's office flash to red when the alarm goes off. The light is radiated from the bottom face of the "ceiling light" brush and not from a point light source. The actual command in the script is:

$redlight lightstyle "Lssaa"

For more info on lightstyle strings, please refer to the 'lightstyle' command in the SinScript Command Reference.



trigger_speaker
 
Description
 
Point class. This will play a sound when triggered. Normal sounds play once each time the trigger is activated. Ambient looped sounds have an attenuation 2 + volume 1 and start off by default. Multiple identical ambient looping sounds will just increase volume without any speed cost. If neither AMBIENT_ON or AMBIENT_OFF are set, the sound is sent over explicitly throughout the level (this creates more net traffic).
 
Keys
 
noise:
path/name of wav file to play.
channel:
channel on which sound is generated (has no effect on ambient sounds). Value ranges from 0 - 8.
    0 :auto channel (automatic).
    1 :weapon channel (sounds from weapons).
    2 :voice channel (talking - default).
    3 :item channel (items on player making sounds).
    4 :body channel (falling to the ground, landing, bodyfalls).
    5 :dialog channel (formal dialog).
    6 :secondary dialog channel (formal dialog).
    7 :weaponidle channel (sounds the player's weapon makes).
    8 :no PHS channel (don't use PHS).
volume:
loudness of sound (default 1). Value ranges from 0 - 4 (floating point). Volume has no effect on ambient sounds.
attenuation:
attenuation of sound with distance (0 becomes 1 for non-ambients, 2 for ambients).
    -1 :none, send to whole level.
     0 :default (normal or ambient).
     1 :normal fighting sounds.
     2 :idle monster sounds.
     3 :static attenuation (same as ambient sounds).
pitch:
the pitch of the sound (has no effect on ambient sounds). Value must be >0 (floating point). For example:
    0.5 :half speed.
    1.0 :normal speed (default).
    2.0 :double speed.
fadetime:
how long the sound takes to fade in seconds (has no effect on ambient sounds, 0 is default).
timeofs:
offset time in milliseconds till the sound starts (has no effect on ambient sounds, 0 is default).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
targetname:
name used by trigger or script to activate this.
thread:
name of thread to call when triggered. This can be in a different script file as well by using the '::' notation.

Spawnflags
 
1
AMBIENT_ON
ambient sounds start on and toggle on/off each time the speaker is triggered.
2
RELIABLE
this sound should be sent over in a reliable fashion (has no effect on ambient sounds). Should only be set for crucial voice-overs or sounds.
4
NOT_PLAYERS
activating trigger will not respond to players.
8
MONSTERS
activating trigger will respond to monsters.
16
PROJECTILES
activating trigger will respond to projectiles (rockets, grenades, mines).
32
AMBIENT_OFF
ambient sounds start off and toggle on/off each time the speaker is triggered (default).
128
TOGGLE
ambient sounds toggle on/off each time the speaker is triggered.

Notes

There are two types of sounds: ambient and normal.

Ambient sounds are always played at volume 1, ambient attenuation. They are automatically stopped and started, and if you have more than one in an area, only one sound will be played, but at a greater volume. Ambient sounds must be placed in an open area, they do use the PVS (Potentially Visible Set) and PHS (Potentially Hearable Set) to determine who to send to, so you cannot embed them in geometry.

Ambient sounds are sent over the network with minimal bandwidth (IOW they are efficient). Ambient sounds all auto-loop, they can be triggered on and off quite easily so they are also ideal for machinery.

Normal sounds can be played at any volume, pitch, attenuation, etc. you want. They are sent over the network explicitly and require more bandwidth. Normal sounds should be used for one time triggers, dialog, etc. Normal sounds only loop if their .wav file has been setup with a loop. Normal sounds play and then end, this is their standard behavior.

Normal sounds can be sent over the network reliably or unreliably. If they are sent over reliably, they are guaranteed to arrive, if unreliable, they are not guaranteed. The RELIABLE flag can be set, but should only be set when you absolutely need to have that sound in a Deathmatch situation, in single play, all sounds are reliable so it isn't an issue.

Info courtesy of Mark Dochterman, Ritual Entertainment.


trigger_thread
 
Description
 
Solid class. This will call a script thread when touched or killed. Can also trigger its targets. By default, this behaves like and has the same capabilities as a trigger_once (since it also supports the 'thread' key). But unlike the trigger_once, it supports the 'cnt' key which can make it repeatable like a trigger_multiple.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
health:
if this is set, trigger must be killed instead of touched to be activated (this also makes the trigger solid).
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to more than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default 1).
message:
text string to print on the screen when the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
targetname:
name refered to when controlled by script.

Spawnflags
 
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.
16
PROJECTILES
the trigger will respond to projectiles (rockets, grenades, mines).

Notes


trigger_use
 
Description
 
Solid class. Trigger that fires its targets when 'used' by a player. This can also call a script thread.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
wait:
amount of time before trigger, once activated, responds to activation again (.2 default). This is useful only if "cnt" is set to a value other than 1.
cnt:
specifies how many times the trigger can fire before it will remove itself (default: infinite).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
alpha:
sets the translucency of the entity if VISIBLE is set (default 1.0).
targetname:
name refered to when controlled by script.

Spawnflags
 
1
VISIBLE
the trigger brush will be both visible and solid.
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.

Notes


trigger_useonce
 
Description
 
Solid class. Trigger that fires its targets when 'used' by a player. This can also call a script thread. Triggers once, then removes itself.
 
Keys
 
target:
this points to the entities to trigger when the trigger is fired.
killtarget:
any entities this points to will be removed when the trigger is fired.
delay:
amount of time trigger waits after being activated before firing its targets (default 0).
message:
text string to print on the screen every time the trigger is activated. Setting this also allows "noise" sound to be played when message is printed.
noise:
sound to play when "message" is printed. The "message" key must be set for sound to be heard (default environment/switch/switch2.wav).
key: name of item required to activate this (default: none). This can be any Inventory_* type entity. Use the last part of the entity name (after "Inventory_"). The only exceptions are:
    ChemBioSuit : use chemsuit instead
    cookies : works but doesn't generate an icon
    genericpulsepart : works but doesn't generate an icon
thread:
name of thread to call when activated. This can be in a different script file as well by using the '::' notation.
alpha:
sets the translucency of the entity if VISIBLE is set (default 1.0).
targetname:
name refered to when controlled by script.

Spawnflags
 
1
VISIBLE
the trigger brush will be both visible and solid.
4
NOT_PLAYERS
the trigger will not respond to players.
8
MONSTERS
the trigger will respond to monsters.

Notes