Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt

...

Display or hide the localhost human player's

...

Note that this is automatically handled by rules.js in challenges and multiplayer/skirmish games.

Availability

...

radar mini-map...

 

Syntax

Code Block
theme

...

RDark
languagejavascript
linenumberstrue
setMiniMap(show);

Parameters

ParameterTypeMandatoryDescriptionGame version
showBoolean(error)

Should the minimap be shown?

  • true – yes, show the mini map
  • false – no

...

Defaults to false if not specified.

...

  • , hide the mini map

Default: false

3.1 Beta 1

Return value

ValueTypeDescriptionGame version
undefinedUndefinedThe function always returns undefined3.1 Beta 1

Example

Code Block
theme

...

RDark
languagejavascript
titleShow or hide minimap based on presence of HQ
linenumberstrue
// don't do this in AI scripts because the setMiniMap() function only applies to the human players minimap
 
function eventStructureBuilt(structure) {
  if (structure.stattype == HQ) setMiniMap(true);
}
function eventDestroyed(gameObj) {
  if (gameObj.type==STRUCTURE && gameObj.stattype==HQ) setMiniMap(false);
}
Div
classsuggest box

Standard game rules require that the mini map is only enabled while the player has a HQ.

Div
classbox
Availability
Status
colourGreen
title3.1 b1+

Requires:

  • Warzone 3.1 Beta 1 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div

See also

Related articles:

  • setDesign() – turn the design tool on or off
  • User Interface – quick reference of JS API features relating to user interface