---
name: "createMarker"
type: command
status: ok
groups: ["Markers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/createMarker
revid: 378854
updated: 2026-07-21T08:47:29Z
---

# createMarker

*Command · Markers · Arma 3 v0.50 · introduced in Armed Assault v1.00*

Locality: effect **global**

## Description

Creates a new map marker at the given position. The marker will be created for every connected player as well as all JIP players. The marker name has to be unique; the command will be ignored if a marker with the given name already exists.

> [!IMPORTANT]
> The marker will be visible only once at least [markerType](../commands/markerType.md) has been defined:
>
> ```sqf
> _marker = createMarker ["markername", player]; // Not visible yet.
> _marker setMarkerType "hd_dot"; // Visible.
> ```

> [!NOTE]
> If the marker position is given in 3D format, the `z`-coordinate is stored with the marker and will be used when the marker is passed to commands such as [createVehicle](../commands/createVehicle.md), [createUnit](../commands/createUnit.md), [createAgent](../commands/createAgent.md), [createMine](../commands/createMine.md) or [setVehiclePosition](../commands/setVehiclePosition.md).
> When a marker is manually placed in the editor, `z` is always 0, which means the marker is placed on the ground. But when the player places a marker on the map in game, it is placed at sea level, so the `z`-coordinate of that marker is `-getTerrainHeightASL markerPos "userMarker";`.

## Syntax

```sqf
createMarker [name, position, channel, creator]
```

**Parameters:**

- `name`: [String](../topics/String.md) - the marker's name, used to reference the marker in scripts.
- `position`: [Position2D](../topics/Position.md#introduction), [PositionAGL](../topics/Position.md#positionagl) or [Object](../topics/Object.md) - In case of an object, the object's model [0,0,0] is used.
- `channel`: [Number](../topics/Number.md) - (Optional, default -1) the marker channel - see Channel IDs (for multiplayer) *(since arma3 2.02)*
- `creator`: [Object](../topics/Object.md) - (Optional, default [objNull](../commands/objNull.md)) the marker creator (for multiplayer) *(since arma3 2.02)*

**Returns:** [String](../topics/String.md) - the marker's name or empty string if the marker name is not unique.

## Examples

### Example 1

```sqf
_marker1 = createMarker ["Marker1", position player];
```

### Example 2

```sqf
_marker2 = createMarker ["Marker2", player]; // since Arma 3 1.50
```

## Multiplayer

> [!NOTE]
> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.
> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).

## Problems

[setMarkerDrawPriority](../commands/setMarkerDrawPriority.md) sorts [allMapMarkers](../commands/allMapMarkers.md) from least to most priority. Before Arma 3 v2.18 [createMarker](../commands/createMarker.md)/[createMarkerLocal](../commands/createMarkerLocal.md) did **not** care about drawing priority and added the created marker to the end of the array, making it top priority. Running [setMarkerDrawPriority](../commands/setMarkerDrawPriority.md) again sorted this issue.

## See also

[createMarkerLocal](../commands/createMarkerLocal.md) · [deleteMarker](../commands/deleteMarker.md) · [BIS_fnc_markerToString](../functions/BIS_fnc_markerToString.md) · [BIS_fnc_stringToMarker](../functions/BIS_fnc_stringToMarker.md)

## Community notes

**Soldia** — 2015-09-19

[createMarker](../commands/createMarker.md) accepts an object as position parameter as well . You could try this with the following code (both SP/MP)

```sqf
_markerstr = createMarker ["markername", player];
_markerstr setMarkerShape "RECTANGLE";
_markerstr setMarkerSize [100, 100];
```

---

**X39** — 2018-05-28

In Arma 3, one can create markers which are deletable by the user by prefixing the name with `_USER_DEFINED`.

Example:

```sqf
createMarker "_USER_DEFINED someMarkerName"
```

---

**7erra** — 2019-05-03

There is a new function with which you can create a marker with all settings applied in one step: [BIS_fnc_stringToMarker](../functions/BIS_fnc_stringToMarker.md) and [BIS_fnc_stringToMarkerLocal](../functions/BIS_fnc_stringToMarkerLocal.md)

---

**Tirpitz** — 2021-01-26

When creating a marker with the name format: "_USER_DEFINED #n1/n2/n3".
n1 can be used to set the owner, n2 I think is an incrementing index to ensure markers are unique, to this end also mangle some more characters onto the end of the string, and n3 is the channel ID the marker is in.

```sqf
_markerName = format ["_USER_DEFINED #%1/%2/%3" , clientOwner,_index, _ChannelID];
_marker = createMarkerLocal [_markerName, _pos];
```

---

**POLPOX** — 2023-07-08

If you use the letter "/" in the name, it may break the channel visibilities (especially in MP).
Possible reason is described above by Tirpitz, the engine may confuse which channel the marker belongs to after the "/".

---

**Leopard20** — 2026-07-21

You can use a helper function if you intend to call createMarker with duplicate marker names. It doesn't necessarily guarantee that the marker has been created (e.g. it could fail not due to duplicate name, but due to maximum number of allowed markers reached)

```sqf
private _fnc_createMarkerSafe = { private _marker = _this#0; createMarker _this; _marker };
private _marker = ["MyMarker", [0,0]] call _fnc_createMarkerSafe; // will return "MyMarker"
```

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