Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
An array of oil resources on the map, filtered to those that don't have derricks built on them at the start of the game. |
Overview
You can use this array to get locations of unclaimed oil resources at the start of the game.
Later in the game it's worth using enumStruct() to find enemy derricks and enumFeature() to find oil resources that have become available (had their derricks destroyed) since the start of the game.
The main use of the 'derrickPositions' array is to position the camera (using centreView() function) on them when giving mission briefings, etc., during campaign missions or challenges.
Values
The 'derrickPostiions' array contains a numerically-referenced list of Position objects that define the co-ordinates of the oil resources that were available at the start of the game.
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
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
derrickPositions.forEach(function(pos) { console("there's one at: "+pos.x+","+pos.y); // x,y }); |
Div | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles:
|