setTriggerStatements: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= <sqf>([^\/: ]+)([^;])<\/sqf>" to "|x$1= <sqf>$2$3;</sqf>") |
||
Line 40: | Line 40: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= <sqf>_trg setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"]</sqf> | |x1= <sqf>_trg setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"];</sqf> | ||
|seealso= [[triggerStatements]] [[createTrigger]] [[setTriggerActivation]] [[setTriggerArea]] [[setTriggerText]] [[setTriggerTimeout]] [[setTriggerType]] [[Magic Variables#this_2|this]] [[thisList]] [[thisTrigger]] [[triggerInterval]] [[setTriggerInterval]] [[enableSimulation]] [[simulationEnabled]] | |seealso= [[triggerStatements]] [[createTrigger]] [[setTriggerActivation]] [[setTriggerArea]] [[setTriggerText]] [[setTriggerTimeout]] [[setTriggerType]] [[Magic Variables#this_2|this]] [[thisList]] [[thisTrigger]] [[triggerInterval]] [[setTriggerInterval]] [[enableSimulation]] [[simulationEnabled]] |
Revision as of 22:43, 28 June 2022
Description
- 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.
- Groups:
- Triggers
Syntax
- Syntax:
- trigger setTriggerStatements [condition, activation, deactivation]
- Parameters:
- trigger: Object - Trigger object
- [condition, activation, deactivation]: Array
- condition: String - Code containing trigger condition. Special variables available here:
- activation: String - Code that is executed when the trigger is activated. Special variables available here:
- thisTrigger (Object) - trigger instance
- thisList (Array) - array of all detected entities
- deactivation: String - Code that is executed when the trigger is deactivated. Special variable available here:
- thisTrigger (Object) - trigger instance
- Return Value:
- Nothing
Examples
- Example 1:
- _trg setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"];
Additional Information
- See also:
- triggerStatements createTrigger setTriggerActivation setTriggerArea setTriggerText setTriggerTimeout setTriggerType this thisList thisTrigger triggerInterval setTriggerInterval enableSimulation simulationEnabled
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Mar 14, 2011 - 20:52
- Scifer
- An array with three arguments is mandatory for this function.
- Posted on September 16, 2014 - 17:41 (UTC)
- Heeeere's Johnny!
- Magic variable thisList does not contain dead units.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Triggers
- Scripting Commands: Local Effect