BWAPI::Order class

An Order (Order type) represents a Unit's current action and can be retrieved with Unit::getOrder.

It can also be used to identify the current state of the unit during command execution (gathering minerals can consist of Orders::MoveToMinerals, Orders::WaitForMinerals, Orders::MiningMinerals, etc.).

Base classes

template<class T, int UnknownId>
class Type<Order, Orders::Enum::Unknown>
Base superclass for all BWAPI Types.

Constructors, destructors, conversion operators

Order(int id = Orders::Enum::None) explicit constexpr
Expected type constructor.

Function documentation

BWAPI::Order::Order(int id = Orders::Enum::None) explicit constexpr

Expected type constructor.

Parameters
id The id that corresponds to this type. It is typically an integer value that corresponds to an internal Broodwar type. If the given id is invalid, then it becomes Types::Unknown.

If the type is an invalid type, then it becomes Types::Unknown. A type is invalid if its value is less than 0 or greater than Types::Unknown.