Arma 3 Scripting

Command in Triggers, Markers, Locations, Positions

inArea

Also available as Markdown and JSON, or read the original wiki page.

Description

Checks whether given position or object is inside given area. Use inAreaArray to check multiple positions/objects within area.

Important

By default all positions given as Array or as objects are treated as PositionAGL. Since Arma 3 v2.20 there is an option to force them to PositionWorld format.

Note

This command also supports hexagon area which can be created from ellipse when both a and b are negative. Hexagon ellipses are also supported by both marker creation and drawEllipse.

Syntax

Syntax 1

position inArea area

Parameters:

Returns: Boolean

Syntax 2

position inArea [center, a, b, angle, isRectangle, c, usePosWorld]

Parameters:

Returns: Boolean

Examples

Example 1

_playerIsInside = player inArea _myTrigger;

Example 2

_positionIsInside = _myPosition inArea [[100, 100, 0], 20, 30, 45, false];

See also

inAreaArray · triggerArea · in · inPolygon · drawEllipse · drawRectangle · createTrigger · createMarker · createLocation