Feature objects describe inanimate game objects such as oil barrels and resources, artefacts, log cabins and skyscrapers, trees, etc.
Properties
Inherits all the properties of a Game objects (id, x, y, z, player, selected, name, health, armour, thermal, etc.) then adds/overrides the properties listed below.
OIL_RESOURCE – an oil resource that you can build a derrick on
All other features don't have the stattype property.
3.2
Notes
When an oil derrick is built on an oil resource, the oil resource feature is removed from the map. If the derrick is later destroyed, a new oil resource feature will be added to the map. Positions of oil resources can be found in the derrickPositions[] array.
When artefacts and oil drums are picked up, their associated feature object is removed from the map. It's not currently possible for non-human players to pick up such items.
Most features can be destroyed (see "damageable" property). The only features that cannot be destroyed (by attacking them) are: Boulders, oil resources, artefacts, oil barrels – the last 3 can be removed from the map by building a derrick (on an oil resource) or collecting them (in case of artefacts and barrels). Oil resources will automatically re-appear, and burn for a short while, if the derrick is destroyed.
When collectible features are picked up, eventDestroyed() is often called.
Other: If specified when using queue() or setTimer(), the resultant function calls will be passed a feature object. If you bind() to a feature object, the function called when it is destroyed will be passed the feature object.
See also
You might also like:
Features – quick reference to associated API features