---
name: "getWPPos"
type: command
status: ok
groups: ["Waypoints"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getWPPos
revid: 377567
updated: 2026-01-02T06:55:33Z
---

# getWPPos

*Command · Waypoints · Arma 3 v0.50 · introduced in Operation Flashpoint v1.21*

Locality: arguments **global**

Alias: [waypointPosition](../commands/waypointPosition.md)

## Description

Returns the position of a selected waypoint of a given group. Waypoints include only those which were placed in the mission editor.

## Syntax

```sqf
getWPPos [groupOrUnit, index]
```

**Parameters:**

- `groupOrUnit`: [Group](../topics/Group.md) or [Object](../topics/Object.md) - the group (or unit) of which to select a waypoint
- `index`: [Number](../topics/Number.md) - 0 equals the starting position of the group.

  The number used in this and other waypoint commands is *one more* than the one displayed in the waypoint window in the editor: e.g if the editor labeled a waypoint `"0:MOVE"` then it can be accessed using `getWPPos [grp, 1]`

**Returns:** [Position3D](../topics/Position.md#introduction) - the returned position equals [0,0,0] if the selected waypoint does not exist.

## Examples

### Example 1

```sqf
[_group1, 1] setWPPos [200,600,0];
_pos = getWPPos [_group1, 1]; // returns [200, 600, 0]
```

## See also

[setWPPos](../commands/setWPPos.md)

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