(info) Other great resources: Official JS API docs, Scripting Forum

addFeature()

Add a feature object (tree, log cabin, etc.) to the map...

 

Syntax

addFeature(name, x, y);

Parameters

ParameterTypeMandatoryNotesGame Version
nameString(tick)The id of the feature to add (most likely from features.txt?)3.2
xNumber(tick)The x co-ordinate of the feature3.2
yNumber(tick)The y co-ordinate of the feature3.2

Return values

ValueTypeNotesGame Version
<featureObj>Feature objectIf the feature was successfully added, an object describing the feature will be returned.3.2
nullNullIf the feature did not get added, null is returned.3.2
<error>ErrorAn error will be thrown if some other error occurs, eg. missing or invalid parameters.3.2

Examples

None at present.

 

Will cause desync if used in multiplayer games.
Availability 3.2+

Requires:

  • Warzone 3.2 or above
Contents

Jump to:

See also

Related articles: