setTriggerStatements: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "this" to "this")
Line 17: Line 17:


|p3= condition: [[String]] - Code containing trigger condition. Special variables available here:
|p3= condition: [[String]] - Code containing trigger condition. Special variables available here:
* [[this]] ([[Boolean]]) - detection event
* [[Magic Variables#this_2|this]] ([[Boolean]]) - detection event
* [[thisTrigger]] ([[Object]]) - trigger instance
* [[thisTrigger]] ([[Object]]) - trigger instance
* [[thisList]] ([[Array]]) - array of all detected entities
* [[thisList]] ([[Array]]) - array of all detected entities
Line 30: Line 30:
|x1= <code>_trg [[setTriggerStatements]] ["this", "[[hint]] 'trigger on'", "[[hint]] 'trigger off'"]</code>
|x1= <code>_trg [[setTriggerStatements]] ["this", "[[hint]] 'trigger on'", "[[hint]] 'trigger off'"]</code>


|seealso= [[triggerStatements]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerArea]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[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 13:06, 25 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Triggers

Syntax

Syntax:
Syntax needed
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:
deactivation: String - Code that is executed when the trigger is deactivated. Special variable available here:
Return Value:
Return value needed

Examples

Example 1:
_trg setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"]

Additional Information

See also:
triggerStatementscreateTriggersetTriggerActivationsetTriggerAreasetTriggerTextsetTriggerTimeoutsetTriggerTypethisthisListthisTriggertriggerIntervalsetTriggerIntervalenableSimulationsimulationEnabled

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.