btech.autopilot.orders

btech.autopilot.orders is an immutable namespace of typed BtechAutopilotOrderName constants. Use these values as the name discriminator accepted by add_order; raw strings are rejected.

Function

Synopsis

btech.autopilot.orders.CONSTANT

Arguments

This namespace takes no arguments.

Returns

BtechAutopilotOrderName constant
The typed order name represented by CONSTANT.

Raises

Raises mux.arg.invalid for invalid lookup, mutation, or use as the wrong typed argument.

Notes

Constants belong to their namespace and the Lua runtime that created them.

ConstantOrder
CHASE_TARGETChase a target unit.
DUMB_FOLLOWFollow a target without pathfinding.
FOLLOWFollow a target using normal navigation.
EMBARKEmbark into a target unit.
PICK_UPPick up a target unit.
DUMB_GOTOMove directly to map coordinates.
GOTONavigate to map coordinates.
OLD_GOTOUse the legacy coordinate-navigation behavior.
ENTER_BASEEnter a base from a direction.
LEAVE_BASELeave a base on a heading.
ROAMRoam a map or radius.
AUTO_GUNConfigure automatic gunnery.
DROP_OFFDrop off a carried unit.
SHUT_DOWNShut down the associated unit.
START_UPStart the associated unit.
UNIT_DISEMBARKDisembark the associated unit.
SPEEDSet the desired speed percentage.

Repeated lookups of the same order compare equal and stringify to their uppercase key; other values, constant kinds, and runtimes compare unequal. Unknown lookups and attempts to modify a constant or the namespace raise mux.arg.invalid. Constants belong to their namespace and current Lua runtime; a raw string or a different kind of BTech constant is rejected.

btech.autopilot.add_order(autopilot, {
  name = btech.autopilot.orders.GOTO,
  x = 12,
  y = 7,
})

Status snapshots return these same typed constants in each order’s name field, so values round-trip directly back into add_order.

See Also