UnitCommand¶
-
class
BWAPI.
UnitCommand
¶ Constructors
-
UnitCommand
()¶
-
UnitCommand
(unit, commandType, target, x, y, extra) Parameters: - unit (BWAPI.Unit) –
- commandType (BWAPI.UnitCommandType) –
- target (BWAPI.Unit) –
- x (int) –
- y (int) –
- extra (int) –
Member Functions
-
getSlot
() → int¶ Important
See the differences between the C++ and Lua implementations of this function for more information
Returns: Return type: int
-
getTarget
() → Unit¶ Returns: Return type: BWAPI.Unit
-
getTargetPosition
() → Position¶ Returns: Return type: BWAPI.Position
-
getTargetTilePosition
() → TilePosition¶ Returns: Return type: BWAPI.TilePosition
-
getTechType
() → TechType¶ Returns: Return type: BWAPI.TechType
-
getType
() → UnitCommandType¶ Returns: Return type: BWAPI.UnitCommandType
-
getUnit
() → Unit¶ Returns: Return type: BWAPI.Unit
-
getUnitType
() → UnitType¶ Returns: Return type: BWAPI.UnitType
-
getUpgradeType
() → UpgradeType¶ Returns: Return type: BWAPI.UpgradeType
-
isQueued
() → boolean¶ Returns: Return type: boolean
-
assignTarget
(target)¶ Parameters: target (BWAPI.Position) – The new target.
Static Functions
-
static
attack
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (
BWAPI.Position
orBWAPI.Unit
) – Can be either aPosition
orUnit
. - shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
build
(unit, target, type) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.TilePosition) –
- type (BWAPI.UnitType) –
Returns: Return type: UnitCommand
-
static
buildAddon
(unit, type) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- type (BWAPI.UnitType) –
Returns: Return type: UnitCommand
-
static
burrow
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
cancelAddon
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
cancelConstruction
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
cancelMorph
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
cancelResearch
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
cancelTrain
(unit[, slot = -2]) → UnitCommand¶ Important
See the differences between the C++ and Lua implementations of this function for more information
Parameters: - unit (BWAPI.Unit) –
- slot (int) – Identifies the slot that will be cancelled. If the specified value is at least 1, then the unit in the corresponding slot will be cancelled. If the value is either omitted or -2, then the last slot is cancelled.
Returns: Return type: UnitCommand
-
static
cancelUpgrade
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
cloak
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
decloak
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
follow
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
gather
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
haltConstruction
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
holdPosition
(unit[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
land
(unit, target) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.TilePosition) –
Returns: Return type: UnitCommand
-
static
lift
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
load
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
morph
(unit, type) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- type (BWAPI.UnitType) –
Returns: Return type: UnitCommand
-
static
move
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Position) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
patrol
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Position) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
placeCOP
(unit, target) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.TilePosition) –
Returns: Return type: UnitCommand
-
static
repair
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
research
(unit, tech) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- tech (BWAPI.TechType) –
Returns: Return type: UnitCommand
-
static
returnCargo
(unit[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
rightClick
(unit, target[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (
BWAPI.Position
orBWAPI.Unit
) – Can be either aPosition
orUnit
. - shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
setRallyPoint
(unit, target) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (
BWAPI.Position
orBWAPI.Unit
) – Can be either aPosition
orUnit
.
Returns: Return type: UnitCommand
-
static
siege
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
stop
(unit[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
train
(unit, type) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- type (BWAPI.UnitType) –
Returns: Return type: UnitCommand
-
static
unburrow
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
unload
(unit, target) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Unit) –
Returns: Return type: UnitCommand
-
static
unloadAll
(unit[, shiftQueueCommand = false]) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
unloadAll
(unit, target[, shiftQueueCommand = false]) → UnitCommand Parameters: - unit (BWAPI.Unit) –
- target (BWAPI.Position) –
- shiftQueueCommand (boolean) –
Returns: Return type: UnitCommand
-
static
unsiege
(unit) → UnitCommand¶ Parameters: unit (BWAPI.Unit) – Returns: Return type: UnitCommand
-
static
upgrade
(unit, upgrade) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- upgrade (BWAPI.UpgradeType) –
Returns: Return type: UnitCommand
-
static
useTech
(unit, tech) → UnitCommand¶ Parameters: - unit (BWAPI.Unit) –
- tech (BWAPI.TechType) –
Returns: Return type: UnitCommand
-
static
useTech
(unit, tech, target) → UnitCommand Parameters: - unit (BWAPI.Unit) –
- tech (BWAPI.TechType) –
- target (
BWAPI.Position
orBWAPI.Unit
) – Can be either aPosition
orUnit
.
Returns: Return type: UnitCommand
-