Arma 3 Scripting

Command in Triggers

setTriggerStatements

Also available as Markdown and JSON, or read the original wiki page.

Description

Defines trigger condition, activation and deactivation statements. Trigger condition has to return Boolean. true will activate the trigger, false will deactivate it (only if activation is set to repeat). thisList returns the same result as list command, which includes all entities in the trigger area that are capable of activating the trigger. Dead entities are excluded as well as crew in vehicles, vehicles themselves are included.

Syntax

trigger setTriggerStatements [condition, activation, deactivation]

Parameters:

Returns: Nothing

Examples

Example 1

_trg setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"];

Example 2

Since Arma 3 v2.22:

_trg setTriggerStatements ["this", "hint ('Activated by ' + str thisActivator)", ""];

See also

triggerStatements · createTrigger · setTriggerActivation · setTriggerArea · setTriggerText · setTriggerTimeout · setTriggerType · Magic Variables · thisList · thisTrigger · triggerInterval · setTriggerInterval · enableSimulation · simulationEnabled

Community notes

Scifer

An array with three arguments is mandatory for this function.

Heeeere's Johnny!

Magic variable thisList does not contain dead units.