Trigger commands
 
Specific commands which control the trigger_* type entities. The trigger entities also responds to many entity commands (gameX86 source code reference: trigger.cpp).

Specific entity commands are colored in brown in my custom SinScript syntax coloring wordfile for UltraEdit32.


activatetrigger  
 
Function
 
This will cause a trigger to fire its target, killtarget, message and noise keys but won't call the thread that its "thread" key points to.

Syntax
 
$<trigger_name> activatetrigger <activator_entity>

Notes & examples
 
This command requires an activator entity as the command argument. The activator can be any entity that is normally capable of activating this trigger in the game such as an actor or the player. When activating a trigger with this command, the most current argument is *1 (the player). There is a command that does the opposite of this command: triggerthread.

Note:
This command ignores the value of the trigger entity's "wait", "delay" and "cnt" keys or the values set by the last wait, delay and cnt commands.



attenuation  
 
Function
 
This sets the attenuation value of the sound played by a trigger_speaker entity.

Syntax
 
$<triggerspeaker_name> attenuation <value>

Notes & examples
 
The value set by this command overrides the value of the entity's "attenuation" key. For a list of the attenuation values and their meaning, refer to the docs of the trigger_speaker entity.

Note:
This command applies to trigger_speaker entities only.



channel  
 
Function
 
This sets the channel on which the sound is played by a trigger_speaker entity.

Syntax
 
$<triggerspeaker_name> channel <channel_number>

Notes & examples
 
The value set by this command overrides the value of the entity's "channel" key. For a list of the possible sound channels, refer to the docs of the trigger_speaker entity.

Note:
This command applies to trigger_speaker entities only.



cnt  
 
Function
 
This sets the count value of the trigger entity.

Syntax
 
$<trigger_name> cnt <value>

Notes & examples
 
The cnt value set by this command overrides the value of the entity's "cnt" key. The count value sets how many times the trigger can be activated in the game before removing itself.


delay  
 
Function
 
This sets the delay value of the trigger entity.

Syntax
 
$<trigger_name> delay <time>

Notes & examples
 
The delay value set by this command overrides the value of the entity's "delay" key. The delay value sets the amount of time the trigger takes to fire its targets when activated.


key  
 
Function
 
This sets the key value of the trigger entity.

Syntax
 
$<trigger_name> key <item_name>

Notes & examples
 
The key value set by this command overrides the value of the entity's "key" key. The key value sets the name of the item required to activate the trigger. For a list of all possible items, refer to the notes of the item Sentient command.


killtarget  
 
Function
 
This sets the killtarget value of the trigger entity.

Syntax
 
$<trigger_name> killtarget <value>

Notes & examples
 
The killtarget value set by this command overrides the value of the entity's "killtarget" key. The killtarget value points to the targetname of the entity to remove when the trigger is activated.


message  
 
Function
 
This sets the message value of the trigger entity.

Syntax
 
$<trigger_name> message "<string>"

Notes & examples
 
The message value set by this command overrides the value of the entity's "message" key. The message value is the text string to print on the screen when the trigger is activated.


noise  
 
Function
 
This sets the noise value of the trigger entity.

Syntax
 
$<trigger_name> noise "<path/filename>.wav"

Notes & examples
 
The noise value set by this command overrides the value of the entity's "noise" key. The noise value is the name of the .wav file to play when the trigger's message is printed on the screen upon activation of the trigger.

Note:
In order for this command to have any effect, the trigger entity's message value must be set either by the entity's "message" key or by the message command.



setdamage  
 
Function
 
This sets the amount of damage a trigger_hurt entity will inflict when touched.

Syntax
 
$<triggerhurt_name> setdamage <value>

Notes & examples
 
The damage value set by this command overrides the value of the entity's "damage" key.

Note:
This command applies to trigger_hurt entities only. Also, do not confuse this command with the setdamage Scriptslave command. It is an entirely different command with a different function even though it has the same name.



setdirection  
 
Function
 
This sets the pitch, yaw and roll angles for the direction in which a trigger_particles entity will throw its particles.

Syntax
 
$<triggerparticles_name> setdirection "<Pitch Yaw Roll>"

Notes & examples
 
The value set by this command overrides the value of the entity's "angles" key.

Note:
This command applies to trigger_particles entities only.



target  
 
Function
 
This sets the target value of the trigger entity.

Syntax
 
$<trigger_name> target <value>

Notes & examples
 
The target value set by this command overrides the value of the entity's "target" key. The target value points to the targetname of the entity to fire when the trigger is activated.


triggerthread  
 
Function
 
This will cause a trigger to call the thread that its "thread" key points to but won't fire its target, killtarget, message and noise keys.

Syntax
 
$<trigger_name> triggerthread

Notes & examples
 
There is a command that does the opposite of this command: activatetrigger.


volume  
 
Function
 
This sets the volume of the sound played by a trigger_speaker entity.

Syntax
 
$<triggerspeaker_name> volume <value>

Notes & examples
 
The value set by this command overrides the value of the entity's "volume" key. Values range from 0 to 4.

Note:
This command applies to trigger_speaker entities only.



wait  
 
Function
 
This sets the wait value of the trigger entity.

Syntax
 
$<trigger_name> wait <time>

Notes & examples
 
The wait value set by this command overrides the value of the entity's "wait" key. The wait value sets the amount of time the trigger takes to become re-triggerable after having been activated.