The JS API has several object types that you'll encounter regularly when developing scripts... |
Each object has a number of properties that defines its specific attributes. For more information, see the links below:
Note: PLAYER_DATA & RESEARCH_DATA constants were added in Warzone 3.1 Beta 11.
Object documentation | .type property | Notes | Availability |
---|---|---|---|
Area object | AREA | An object defining top-left and bottom-right co-ordinates for an area of the map. | |
DROID | Describes a droid (unit) on the map or being produced in a factory. Inherits Game object fields. | ||
FEATURE | A map feature such as a tree, log cabin, oil barrel, artefact or oil derrick, etc. Inherits Game object fields. | ||
Group Object | GROUP | Information about a group defined in labels.ini. | |
STRUCTURE | A building or defence structure on the map that's owned by a human, AI or scavenger player. Inherits Game object fields. | ||
Player object | PLAYER_DATA | Contains information about a specific player. | |
Position object | POSITION | Contains the x,y co-ordinate of a specific location on the map. | |
Research object | RESEARCH_DATA | Contains information about a specific technology. | |
Template Object | Contains information about a template (see Components & Templates) | ||
Weapon Object | Contains information about a weapon (see getWeaponInfo()) |
Javascript makes it easy to create custom objects and arrays – here's some useful links if you're new to Javascript:
Quick LinksGame objects (a.k.a "base objects"): Data objects:
Location objects: |