BIS_fnc_inTrigger

From Bohemia Interactive Community
Revision as of 16:43, 31 July 2015 by Heeeere's johnny! (talk | contribs) (formatted page and added example)
Jump to navigation Jump to search


Hover & click on the images for description

Description

Description:
Detects whether a position is within the trigger area of the given trigger.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[trigger, position, (isScalar)] call BIS_fnc_inTrigger
Parameters:
trigger: Object or Array - Trigger or trigger area
position: Object or Array - reference object (e.g. player) or Position
isScalar (Optional): Boolean - true for scalar result [default: false]
Return Value:
Boolean - true when position is in trigger area, false otherwise
Number - distance from border if isScalar is true

Examples

Example 1:
_trigger = createTrigger ["EmptyDetector", getPosATL player]; _trigger setTriggerArea [10, 10, 0, false]; _inTrigger = [_trigger, player] call BIS_fnc_inTrigger; //_inTrigger = true

Additional Information

See also:
createTrigger createMarker setTriggerArea setMarkerSize triggerArea markerSize

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

Bottom Section

Posted on May 6, 2015 - 19:34 (UTC)
Killzone Kid
Works with markers too: inMarker = ["markername", _position] call BIS_fnc_inTrigger;