setTriggerArea: 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 40: Line 40:
_trg [[setTriggerArea]] [5, 5, 0, [[false]]];
_trg [[setTriggerArea]] [5, 5, 0, [[false]]];
_trg [[setTriggerActivation]] ["CIV", "PRESENT", [[true]]];
_trg [[setTriggerActivation]] ["CIV", "PRESENT", [[true]]];
_trg [[setTriggerStatements]] ["[[this]]", "[[hint]] 'Civilian near player'", "[[hint]] 'no civilian near'"];</code>
_trg [[setTriggerStatements]] ["[[Magic Variables#this_2|this]]", "[[hint]] 'Civilian near player'", "[[hint]] 'no civilian near'"];</code>


|seealso= [[triggerArea]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerStatements]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[inArea]], [[inAreaArray]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]]
|seealso= [[triggerArea]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerStatements]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[inArea]], [[inAreaArray]], [[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 - object of the type "EmptyDetector"
[a, b, angle, isRectangle, c]: Array
a: Number - trigger area X size / 2, in meters
b: Number - trigger area Y size / 2, in meters
angle: Number - trigger area rotation in degrees
isRectangle: Boolean - true if rectangle
c: Number - (Optional) trigger area Z size / 2, in meters. -1 for infinite height Template:Since
Return Value:
Return value needed

Examples

Example 1:
_trigger setTriggerArea [100, 50, 45, false];
Example 2:
_trigger setTriggerArea [100, 50, 45, false, 100];
Example 3:
_trg = createTrigger ["EmptyDetector", getPos player, false]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerActivation ["CIV", "PRESENT", true]; _trg setTriggerStatements ["this", "hint 'Civilian near player'", "hint 'no civilian near'"];

Additional Information

See also:
triggerAreacreateTriggersetTriggerActivationsetTriggerStatementssetTriggerTextsetTriggerTimeoutsetTriggerTypeinAreainAreaArraytriggerIntervalsetTriggerIntervalenableSimulationsimulationEnabled

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