Arma 3 Scripting

Command in Map, Interaction

openMap

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

Description

Opens or closes in-game map.

Warning

If forced param is set to true and map is set to open, when the map is opened it cannot be closed manually and the user can get stuck requiring the game restart. Make sure you provide scripted mechanics to resolve this, should you need to force the map. Useful when you wish to keep user for example on respawn screen, where they could still interact with the map but cannot enter the game until the time is up.

Syntax

Syntax 1

openMap show

Parameters:

Returns: Boolean - equivalent of visibleMap

Syntax 2

openMap [show, forced]

Parameters:

Returns: Boolean - equivalent of visibleMap

Examples

Example 1

openMap [true, false];    // opens map normally
openMap [false, false];    // closes an opened map normally
openMap [true, true];    // force opens map and keeps it open (the user cannot close it on their own)
openMap [false, true];    // since Arma 3 2.06: prevents map from opening, closes open map and forces it to stay close (the user cannot open it on their own)

See also

forceMap · forcedMap · visibleMap · showMap · shownMap

Community notes

Fraali

(As of Arma 3 ver.2.06.148470)

Trying to close a map using openMap false inside of a map event handler like

addMissionEventHandler ["Map", { openMap false }];

will cause the game to crash.

To fix this, please use it inside of a spawned script.

addMissionEventHandler ["Map", { 0 spawn { openMap false }; }];

This should stop any issue of crashing when you close the map.