Arma 3 Scripting

allMapMarkers

  • Arma 3 v0.50

Command · Markdown · JSON · original wiki page

Description

Returns all map marker names, including user-placed markers.

Note

  • Arma 3 v1.58 User-defined markers have the following name format: _USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID>, where:
  • To obtain the custom waypoint's (set with LShift+LMB) position, see customWaypointPosition.

Syntax

allMapMarkers

Returns: Array of Strings

Examples

Example 1

_markers = allMapMarkers; // returns e.g ["marker1", "_USER_DEFINED #2/0"]

Example 2

{
    private "_a";
    _a = toArray _x;
    _a resize 15;
    if (toString _a == "_USER_DEFINED #") then
    // or if (_x select [0, 15] == "_USER_DEFINED #") since Arma 3 v1.28
    {
        deleteMarker _x;
    };
} forEach allMapMarkers;

Example 3

if (_someString in allMapMarkers) then
{
    hint (_someString + " is an existing marker");
};

See also

createMarker · deleteMarker · customWaypointPosition