---
name: "inArea"
type: command
status: ok
groups: ["Triggers", "Markers", "Locations", "Positions"]
arma3_since: "1.58"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/inArea
revid: 377541
updated: 2026-01-02T06:54:31Z
---

# inArea

*Command · Triggers, Markers, Locations, Positions · Arma 3 v1.58*

## Description

Checks whether given position or object is inside given area. Use [inAreaArray](../commands/inAreaArray.md) to check multiple positions/objects within area.

> [!IMPORTANT]
> By default all positions given as [Array](../topics/Array.md) or as objects are treated as [PositionAGL](../topics/Position.md). Since Arma 3 v2.20 there is an option to force them to [PositionWorld](../topics/Position.md) 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](../commands/drawEllipse.md).

## Syntax

### Syntax 1

```sqf
position inArea area
```

**Parameters:**

- `position`: [Object](../topics/Object.md) or [Position2D](../topics/Position.md#introduction) or [Position3D](../topics/Position.md#introduction) (must be [PositionAGL](../topics/Position.md#positionagl) if area is checked in 3D)
- `area`: [Object](../topics/Object.md), [String](../topics/String.md), [Location](../topics/Location.md)
  - [Object](../topics/Object.md) - trigger
  - [String](../topics/String.md) - marker name
  - [Location](../topics/Location.md) - location

**Returns:** [Boolean](../topics/Boolean.md)

### Syntax 2

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

**Parameters:**

- `position`: - [Object](../topics/Object.md) and/or [Position](../topics/Position.md) to check. [Position](../topics/Position.md) must be [PositionAGL](../topics/Position.md#positionagl) if area is checked in 3D (see note in description)
- `center`: [Array](../topics/Array.md) or [Object](../topics/Object.md) - center of the area in format [Position2D](../topics/Position.md#introduction), [Position3D](../topics/Position.md#introduction) (must be [PositionAGL](../topics/Position.md#positionagl) if area is checked in 3D), [Object](../topics/Object.md) or [Group](../topics/Group.md)
- `a`: [Number](../topics/Number.md) - x axis (x / 2)
- `b`: [Number](../topics/Number.md) - y axis (y / 2)
- `angle`: [Number](../topics/Number.md) - (Optional since 2.20, Default: 0) rotation angle
- `isRectangle`: [Boolean](../topics/Boolean.md) - (Optional since 2.20, Default: false) [true](../commands/true.md) if rectangle, [false](../commands/false.md) if ellipse
- `c`: [Number](../topics/Number.md) - (Optional, default -1 (unlimited)) z axis (z / 2) *(since arma3 1.60)*
- `usePosWorld`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) set to [true](../commands/true.md) to treat all positions as [PositionWorld](../topics/Position.md) *(since Arma3 2.20)*

**Returns:** [Boolean](../topics/Boolean.md)

## Examples

### Example 1

```sqf
_playerIsInside = player inArea _myTrigger;
```

### Example 2

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

## See also

[inAreaArray](../commands/inAreaArray.md) · [triggerArea](../commands/triggerArea.md) · [in](../commands/in.md) · [inPolygon](../commands/inPolygon.md) · [drawEllipse](../commands/drawEllipse.md) · [drawRectangle](../commands/drawRectangle.md) · [createTrigger](../commands/createTrigger.md) · [createMarker](../commands/createMarker.md) · [createLocation](../commands/createLocation.md)

<sub>Source: [BI Community Wiki — inArea](https://community.bistudio.com/wiki/inArea) (revision 377541).</sub>
