Global

Methods

canAttackClass()

returns true if the entity can attack (including capture) the given class.
Source:

canAttackTarget() → {boolean}

Derived from Attack.js' similary named function.
Source:
Returns:
- Whether an entity can attack a given target.
Type
boolean

canCapture()

returns true if the tempalte can capture the given target entity if no target is given, returns true if the template has the Capture attack
Source:

footprintRadius()

Returns the radius of a circle surrounding this entity's footprint.
Source:

getMetadata()

Returns extra data that the AI scripts have associated with this entity, for arbitrary local annotations. (This data should not be shared with any other AI scripts.)
Source:

obstructionRadius()

Returns { "max": max, "min": min } or undefined if no obstruction. max: radius of the outer circle surrounding this entity's obstruction shape min: radius of the inner circle
Source:

setMetadata()

Sets extra data to be associated with this entity.
Source:

trainingQueue()

Returns the current training queue state, of the form [ { "id": 0, "template": "...", "count": 1, "progress": 0.5, "metadata": ... }, ... ]
Source: