setTriggerStatements: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (format)
m ("thisList" does not exist in deactivation block)
Line 17: Line 17:
|p2= condition: [[String]] - Code containing the trigger's condition, which has to return a [[boolean]] value. If ''this'' is used, the result of the trigger's [[setTriggerActivation|activation condition]] is interpreted.|= Parameter 2
|p2= condition: [[String]] - Code containing the trigger's condition, which has to return a [[boolean]] value. If ''this'' is used, the result of the trigger's [[setTriggerActivation|activation condition]] is interpreted.|= Parameter 2
|p3= activation: [[String]] - Code that is executed when the trigger is activated (The variable [[this|thislist]] contains an array with the units that activated the trigger.)|= Parameter 3
|p3= activation: [[String]] - Code that is executed when the trigger is activated (The variable [[this|thislist]] contains an array with the units that activated the trigger.)|= Parameter 3
|p4= deactivation: [[String]] - Code that is executed when the trigger is deactivated. |= Parameter 4
|p4= deactivation: [[String]] - Code that is executed when the trigger is deactivated. (The variable [[this|thisList]] does not exist here.)|= Parameter 4


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value

Revision as of 03:40, 9 December 2014

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Defines a trigger's condition, and executable code for its activation and deactivation events.
Groups:
Uncategorised

Syntax

Syntax:
trigger setTriggerStatements [condition, activation, deactivation]
Parameters:
trigger: Object - Trigger object
condition: String - Code containing the trigger's condition, which has to return a boolean value. If this is used, the result of the trigger's activation condition is interpreted.
activation: String - Code that is executed when the trigger is activated (The variable thislist contains an array with the units that activated the trigger.)
deactivation: String - Code that is executed when the trigger is deactivated. (The variable thisList does not exist here.)
Return Value:
Nothing

Examples

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

Additional Information

See also:
triggerStatementscreateTriggersetTriggerActivationsetTriggerAreasetTriggerTextsetTriggerTimeoutsetTriggerTypethis

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

Notes

Posted on Mar 14, 2011 - 20:52
Scifer
An array with three arguments is mandatory for this function.

Bottom Section

Posted on September 16, 2014 - 17:41 (UTC)
Heeeere's Johnny!
Magic variable thisList does not contain dead units.