Other great resources: Official JS API docs, Scripting Forum
setMiniMap()
- Aubergine
Owned by Aubergine
Display or hide the localhost human player's radar mini-map...
Syntax
setMiniMap(show);
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
show | Boolean | Should the minimap be shown?
Default: | 3.1 Beta 1 |
Return value
Value | Type | Description | Game version |
---|---|---|---|
undefined | Undefined | The function always returns undefined | 3.1 Beta 1 |
Example
Show or hide minimap based on presence of HQ
function eventStructureBuilt(structure) { if (structure.stattype == HQ) setMiniMap(true); } function eventDestroyed(gameObj) { if (gameObj.type==STRUCTURE && gameObj.stattype==HQ) setMiniMap(false); }
Standard game rules require that the mini map is only enabled while the player has a HQ.
Availability 3.1 B1+
Requires:
- Warzone 3.1 Beta 1 or above
Contents
Jump to:
See also
Related articles:
- Mini Map and Design Mode – implementation of standard game rules
- config – the Warzone config file contains some settings that affect what's displayed on the mini map
- Images, Icons & Cursors – customising beacons, mission objectives and burning oil resources shown on the mini map
- setDesign() – turn the design tool on or off
- User Interface – quick reference of JS API features relating to user interface