Commands Module
Functions and values
| Function or value |
Description
|
Full Usage:
AttackCommand unitId targetUnitId
Parameters:
int
targetUnitId : int
Returns: AICommand
|
Create an attack command for a unit to attack a target unit
|
Full Usage:
BuildCommand unitId toBuildUnitDefId x y z facing
Parameters:
int
toBuildUnitDefId : int
x : float32
y : float32
z : float32
facing : int
Returns: AICommand
|
Create a build command for a unit to construct a building
|
|
|
|
|
Full Usage:
CustomCommand unitId commandId params
Parameters:
int
commandId : int
params : float32 list
Returns: AICommand
|
Create a custom command for a unit
|
Full Usage:
FightCommand unitId x y z
Parameters:
int
x : float32
y : float32
z : float32
Returns: AICommand
|
Create a fight command for a unit to fight-move to a position
|
Full Usage:
GiveMeNewUnitCommand unitDefId x y z
Parameters:
int
x : float32
y : float32
z : float32
Returns: AICommand
|
Create a give me new unit command (cheat)
|
Full Usage:
GiveMeResourceCommand resourceId amount
Parameters:
int
amount : float32
Returns: AICommand
|
|
Full Usage:
GuardCommand unitId guardUnitId
Parameters:
int
guardUnitId : int
Returns: AICommand
|
Create a guard command for a unit to guard another unit
|
Full Usage:
INTERNAL_ORDER
Returns: uint32
|
INTERNAL_ORDER flag (bit 3) used for AI-issued commands
|
Full Usage:
MoveCommand unitId x y z
Parameters:
int
x : float32
y : float32
z : float32
Returns: AICommand
|
Create a move command for a unit to a position
|
Full Usage:
MoveCommandQueued unitId x y z
Parameters:
int
x : float32
y : float32
z : float32
Returns: AICommand
|
Create a queued move command for a unit to a position. The command is appended to the unit's existing order queue rather than replacing the current order. Use this for waypoint traversal when you need the unit to execute a sequence of moves in order (e.g., routing through a Pathing findPath result's waypoints). Wire-level effect: sets both INTERNAL_ORDER (8u) and SHIFT_KEY (32u) on the command's Options bitfield, producing Options = 40u. The first waypoint of a sequence should use the unqueued MoveCommand so it replaces any existing order; subsequent waypoints use MoveCommandQueued.
|
Full Usage:
PatrolCommand unitId x y z
Parameters:
int
x : float32
y : float32
z : float32
Returns: AICommand
|
Create a patrol command for a unit to a position
|
Full Usage:
ReclaimUnitCommand unitId reclaimUnitId
Parameters:
int
reclaimUnitId : int
Returns: AICommand
|
Create a reclaim command for a unit to reclaim another unit
|
Full Usage:
RepairCommand unitId repairUnitId
Parameters:
int
repairUnitId : int
Returns: AICommand
|
Create a repair command for a unit to repair another unit
|
Full Usage:
SHIFT_KEY
Returns: uint32
|
SHIFT_KEY flag (bit 5) — queues the command behind the unit's existing orders
|
|
|
Full Usage:
SendTextMessageCommand text zone
Parameters:
string
zone : int
Returns: AICommand
|
|
Full Usage:
SetWantedMaxSpeedCommand unitId wantedMaxSpeed
Parameters:
int
wantedMaxSpeed : float32
Returns: AICommand
|
Create a set wanted max speed command for a unit
|
|
FSBarV1_Archived