Classes
Members
ROLE_ATTACK
ROLE_CRITICAL_ENT_GUARD
ROLE_CRITICAL_ENT_HEALER
ROLE_SWITCH_TO_TRADER
ROLE_TRADER
ROLE_WORKER
SUBROLE_ATTACKING
SUBROLE_BUILDER
SUBROLE_COMPLETING
SUBROLE_DEFENDER
SUBROLE_FISHER
SUBROLE_GARRISONING
SUBROLE_GATHERER
SUBROLE_HUNTER
SUBROLE_IDLE
SUBROLE_WALKING
base
baseAccess
baseAccess
baseID
ent
ent
entAccess
Methods
buildAnyField()
WARNING with the present options of AI orders, the unit will not gather after building the farm.
This is done by calling the gatherNearestField function when construction is completed.
gatherNearestField()
isInaccessibleSupply()
Check accessibility of the target when in approach (in RMS maps, we quite often have chicken or bushes
inside obstruction of other entities). The resource will be flagged as inaccessible during 10 mn (in case
it will be cleared later).
moveToGatherer()
Workers elephant should move away from the buildings they've built to avoid being trapped in between constructions.
For the time being, we move towards the nearest gatherer (providing him a dropsite).
BaseManager does also use that function to deal with its mobile dropsites.
retryWorking()
startBuilding()
startFishing()
startGathering()
startHunting()
if position is given, we only check if we could hunt from this position but do nothing
otherwise the position of the entity is taken, and if something is found, we directly start the hunt