Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodDescriptionValid for
.attack(object)

Attack something (target = feature, droid or structure)

Return: true = attacking, false = can't attack / error

Droids with weapons
.move(location)

Move to a location (any object containing x,y properties)

Return: true = moving, false = can't get there / error

All droids
.retreat()

Retreat to HQ or starting position

Return: true = retreating, false = can't retreat / error

All droids
.recycle()

Go and get recycled

Return: true = recycling, false = can't recycle / error

All droids
.build(something,position)

Build something at a location

Return: true = building, false = can't build / error

.isEngineer
.lineBuild(something,position1,position2)

Build a something several times in a line between position1 and position2

Return: true = building, false = can't build / error

.isEngineer
.helpBuild(object)

Help build a structure - either state the structure, or state a droid that's already building stuff

For example, if a droid is line building, you should pass in that droid to get the other droid to also line build.

Return: true = building, false = can't build / error

.isEngineer
.pickUp(feature)

Pick up a feature (oil barrel, artefact)

Return: true = can pick up, false = can't pick up / error

All droids except VTOL propulsion
.demolish(structure)

Demolish structure (only applies to construction droids)

Return: true = demolishing, false = can't demolish / error

Construction droids
.repairStructure(structure)

Repair a structure

Return: true = repairing, false = can't repair / error

.isEngineer
.repairDroid(droid)

Repair another droid

Return: true = repairing, false = can't repair / error

.isMechanic
.repairSelf([object])

Go and get repaired, optionally at a repair station / rearm pad, or by a repair droid.

If repair object not specified, then just find nearest thing that can repair the droid and use that.

Return: true = getting repaired, false = can't repair / error

All droids
.rearm([pad])

Get rearmed/repaired at a rearming pad (chooses nearest pad unless one specified)

Return: true = rearming, false = can't rearm / error

VTOLs (not transports)
.patrol(position1[,position2])

Patrol between two locations.

If position2 not specified, it defaults to droid's current location.

If position2 is specified, then droid proceeds to nearest position (1 or 2) before starting patrol.

Return: true = patrolling, false = can't patrol / error

All droids

.circle(position)

Circle around a specific position

Return: true = circling, false = can't circle / error

VTOLs (not transports)
.defend(object)

Defend a structure or position

Return: true = defending, false = can't defend / error

All droids
.assignTo(object)

Assign the droid to something that .hasSensor or .hasCB

Return: true = assigned, false = can't assign / error

All droids except .hasSensor / .hasCB
.embark(transportDroid)

Move the droid in to a transporter

Return: true = embarking, false = can't embark / error

All droids except transporters
.disembark()

Move droid off a transporter

Return: true = disembarking, false = can't disembark / error

All droids except transporters
.offloadCargo([droid]position)

Offload all cargo (droids) from a transporter . Optionally specify specific droid to offloadat the specified position.

Return: true = cargo disembarking, false = can't offload cargo / error

Transporters
.transferTo(player)Give the droid to another player 

...