Other great resources: Official JS API docs, Scripting Forum
Game objects
The common properties for all objects that appear on the map such as droids, features and structures.
Properties
Property | Type | Description | Game Version |
|---|---|---|---|
type | Constant | DROID, STRUCTURE or FEATURE (as applicable) Additional properties are added depending on the type. | 3.1 |
id | Number | Unique internal ID for the object. You can get a game object from it's id using the objFromId() function. | 3.1 |
x | Number | The current x co-ordinate of the object on the map | 3.1 |
y | Number | The current y co-ordinate of the object on the map | 3.1 |
z | Number | The current z co-ordinate (elevation) of the object on the map | 3.1 |
player | Number | The player that the object belongs to. For more information see: Note also that "features" are attributed to several players depending on type of feature, for more information see Features. | 3.1 |
selected | Boolean | If the player who owns the object has selected it, this will be | 3.1 |
name | String | The name of the object. Note that objects built using the design tool can be given custom names. This is also true for droids built using the buildDroid() function. | 3.1 |
health | Number | The health of the object, as a percentage where 100 means full health. | 3.1 beta 2 |
armour | Number | The amount of kinetic weapon armour that the object has. | 3.1 beta 2 |
thermal | Number | The amount of thermal weapon armour that the object has. | 3.1 beta 2 |
born | Number | Indicates the gameTime that the object was first created. A value of 2 or less indicates objects that were pre-placed on the map (like starting trucks) by the map designer. | 3.2 |