Versions Compared

Key

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

Enable or disable the design tool...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
setDesign(enable);

Parameters

ParameterTypeMandatoryDescriptionGame version
enableBoolean(error)

Should the design tool be enabled?

  • true – yes, enable the design tool
  • false – no, disable the design tool

Default: false

3.1 Beta 1

Return value

ValueTypeDescriptionGame version
undefinedUndefinedThe function always returns undefined3.1 Beta 1

Notes

This function only affects the user interface for the localhost human player, it does not affect AIs in any way. That being said, AIs should avoid using new droid templates if they don't have a HQ if possible.

Enabling or disabling the design tool automatically shows or hides (as applicable) the DESIGN reticule button:

Example

Code Block
themeRDark
languagejavascript
titleEnable or disable design tool based on presence of HQ...
linenumberstrue
function eventStructureBuilt(structure) {
  if (structure.stattype == HQ) setDesign(true);
}
function eventDestroyed(gameObj) {
  if (gameObj.type==STRUCTURE && gameObj.stattype==HQ) setDesign(false);
}
Div
classsuggest box

Standard game rules require that the design tool 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
classbox

See also

Related articles:

Game mods:

  • Structures by Design – ability to design base defence structures in the same way droids are designed.