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:
show: Boolean - if true opens map, if false closes map, provided it is not forced
Returns: Boolean - equivalent of visibleMap
Syntax 2
openMap [show, forced]
Parameters:
Returns: Boolean - equivalent of visibleMap
Examples
Example 1
openMap [true, false];
openMap [false, false];
openMap [true, true];
openMap [false, true];
See also
forceMap · forcedMap · visibleMap · showMap · shownMap
(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.