Structure object

(info) Other great resources: Official JS API docs, Scripting Forum

Structure object

Describes a structure (something a truck can build) on the map.

 

Properties

Inherits all the properties of a Game objects (id, x, y, z, player, selected, name, health, armour, thermal, born, etc.) then adds/overrides the properties listed below.

Property

Type

Description

Game version

type

Constant

STRUCTURE

3.1

status

Constant

Describes construction status of the structure:

3.1

stattype

Constant

What sort of structure is it?

3.1

modules

Number,
Null 

The number of modules built on the structure, or null if not applicable.

Warzone 3.1 Beta 2 and earlier:

The property would not exist for structures that couldn't have modules.

3.1 beta 2

Improved in 3.1 beta 3

group

Number

The group that the structure is in, or null if it's not in a group.

3.2

cost

Number

What did the structure cost to build?

3.2

range

Number,
Null 

The maximum range of the structures' weapon, or null if not applicable.

:question_mark: It's not clear whether range will be present for sensors.

3.2

isSensor

Boolean

Does this structure have a sensor on it?

  • true - yes

  • false - no

3.2

isCB

Boolean

Does this structure have a counter battery (CB) turret on it?

  • true - yes

  • false - no

3.2

isRadarDetector

Boolean

Does this structure have a radar detector on it?

  • true - yes

  • false - no

3.2

canHitAir

Boolean

Can this structure attack aircraft (VTOLs / transports)?

  • true - yes

  • false - no

3.2

canHitGround

Boolean

Can this structure attack ground units and other structures?

  • true - yes

  • false - no

3.2

hasIndirect

Boolean

Does this structure have an indirect fire weapon (such as artillery or archangel missiles)?

  • true - yes

  • false - no

3.2

weapons

Array of Weapon Status

An array containing basic information about the weapons attached to the droid. Each object in the array contains two properties:

3.2