BIS_fnc_inTrigger

From Bohemia Interactive Community
Revision as of 14:22, 13 June 2021 by Lou Montana (talk | contribs) (Some wiki formatting)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Detects whether position is within area or calculates distance to the nearest edge of trigger area by using optional params.
Arma 3
Since Arma 3 v1.57 inArea is available for an area check.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
[area, position, returnDistance, includeFloorCeiling] call BIS_fnc_inTrigger
Parameters:
area: Object - trigger, String - marker, Location - location or Array - in format [center, distance] or [center, [a, b, angle, rect]] or [center, [a, b, angle, rect, height]]
position: Object or Array - Position to check (e.g. player) or Position
returnDistance (Optional): - (Optional, default false) true to return distance to nearest edge of trigger area
includeFloorCeiling: Boolean - (Optional, default false) to include trigger area floor and ceiling in calculation when calculating distance to nearest edge
Return Value:
  • Boolean - true when position is in area, false if not
  • Number - (when returnDistance is true) - distance from closest border: negative distance - from inside, positive distance - from outside

Examples

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

Additional Information

See also:
createTriggercreateMarkersetTriggerAreasetMarkerSizetriggerAreamarkerSizeinAreainAreaArrayBIS_fnc_getArea

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 May 6, 2015 - 19:34 (UTC)
Killzone Kid
Works with markers too: inMarker = ["markername", _position] call BIS_fnc_inTrigger;
Posted on October 4, 2015 - 11:22 (UTC)
Larrow
Also works with [pos, radius] [[position, radius], player] call BIS_fnc_inTrigger;