Other great resources: Official JS API docs, Scripting Forum
derrickPositions[]
- Aubergine
- NoQ
Â
Overview
This array lists map-placed oil resources, which you can build a derrick on if there isn't already one there.
Depending on baseType setting and map design, some of the listed oil resources will have map-placed derricks already built on them when the game starts.
It is generally better to locate free oil resources using enumFeature() and existing derricks using enumStruct() than to use the derricksPositions[] array. In fact, I can't think of any reliable use for derrickPositions[] array...
Values
The 'derrickPostiions' array contains a numerically-referenced list of Position objects that define the co-ordinates of oil resources.
Property | Type | Description | Game Version |
---|---|---|---|
x | Number | The x co-ordinate of the item | 3.1 Beta 1 |
y | Number | The y co-ordinate of the item | 3.1 Beta 1 |
type | Constant | POSITION | 3.1 Beta 11 |
Note: You can't order a droid to build derricks on position objects, you have to use enumFeature() or eventObjectSeen() to find the oil resource Feature objects.
Examples
derrickPositions.forEach(function(pos) { console("there's one at: "+pos.x+","+pos.y); // x,y });
Availability 3.1 B1+
Requires:
- Warzone 3.1 Beta 1 or above
- The return value was updated in Warzone 3.1 Beta 11
Contents
Jump to:
See also
Related articles:
- enumFeature() – locate feature objects
- enumStruct() – locate enemy derricks
- orderDroidBuild() – order a droid to build a derrick
Â