Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Droids are mobile game objects (items on the map), and have a huge number of properties and related API features... |
Properties
Info |
---|
Inherits all properties of a Game object (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 | DROID | 3.1 | ||||||
order | Constant | The current order (task) that the droid is doing:
... Constants were added over time so check each constant's doc page for version info. | 3.1 ... | ||||||
action | Constant | This is the action that the droid is taking to carry out it's current order, as defined in action.cpp. Image Removed Currently the DACTION constants aren't exposed by the The constants are not currently exposed to JS API, however you can backport them with backport.daction.js.You can see a list of all actions, the number that represents them and what they mean in action.cpp.full list here: .action. | 3.1 | ||||||
droidType | Constant | Defines what sort of droid it is:
| 3.1 | ||||||
group | Number NullNull <not defined> | Defines what group the droid is in, or returns If the droid isn't in a group then the group property will return Warzone 3.1 and earlier: If the droid isn't in a group then the group property won't exist! | 3.1 | ||||||
experience | Number | A number representing the droid's experience. This number can optionally be set using the setDroidExperience() function. | 3.1 | ||||||
armed | Number Null | Defines the weapon capability remaining, as a percentage, for VTOLs. Warzone 3.2.0: If the droid isn't a VTOL, the property returns So, 100 = fully armed, 0 = no shots left (the VTOL needs to go to a reaming pad before it can make more attacks). Warzone 3.1 and earlier:
| 3.1→3.2.0 | ||||||
isVTOL | Boolean | Tells you if the droid is a VTOL or not:
You can also use the isVTOL() function to find out if a droid object is a VTOL. | 3.2 | ||||||
cost | Number | The amount of power it cost to create the droid. | 3.2 | ||||||
isRadarDetector | Boolean | Does the droid have a radar detector turret?
| 3.2 | ||||||
range | Number Null | The maximum range of the droids weapon, or null if not applicable. It's not clear whether range will be present for sensors. | 3.2 | ||||||
isCB | Boolean | Does the droid have a counter battery (CB) turret?
| 3.2 | ||||||
isSensor | Boolean | Does the droid have a sensor turret?
| 3.2 | ||||||
canHitAir | Boolean | Can the droid attack aircraft (VTOLS / transports)?
| 3.2 | ||||||
canHitGround | Boolean | Can the droid attack stuff on the ground (tanks, structures, features, etc)?
| 3.2 | ||||||
hasIndirect | Boolean | Does this droid have indirect fire capability (eg. artillery)?
| 3.2 | ||||||
body | String | The ID of the body that the droid is using. Some of the more common bodies are listed below:
For a full list, including cyborgs and scavenger bodies, see: body.ini | 3.2 | ||||||
propulsion | String | The ID of the propulsion that the droid is using. For a list of propulsion types, see: propulsion.txt | 3.2 | ||||||
cargoSize | Number | The amount of cargoCapacity the droid will consume if loaded in to a transport. In campaign mode:
In other game modes, the cargo size is based on bodySize:
| 3.2 | ||||||
cargoCapacity | Number <not defied> | For transports only, this defines the total capacity of the cargo hold. For non-transport droids, the property will be undefined, so you should either check the property exists or that the droid is a transport before attempting to read the value. | 3.2 | ||||||
cargoSpace | Number <not defined> | For transports only, the amount of cargo space remaining. For non-transport droids, the property will be undefined, so you should either check the property exists or that the droid is a transport before attempting to read the value. | 3.2 | ||||||
cargoCount | Number <not defined> | For transports only, this defines the number of droids in the cargo hold. For non-transport droids, the property will be undefined, so you should either check the property exists or that the droid is a transport before attempting to read the value. | 3.2 | ||||||
bodySize | Number | The size of the droid's body, which can be used to determine the number of factory modules required to build it. before you can build it:
For more information, see: Working with Factories. | 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 |
Div | ||
---|---|---|
| ||
Tip: |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Droid objects were introduced in:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Include Page | ||||
---|---|---|---|---|
|