BWAPI  4.2.0
An API for interacting with Starcraft: Broodwar (1.16.1)
Public Member Functions | List of all members
BWAPI::Order Class Reference
Inheritance diagram for BWAPI::Order:
Inheritance graph

Public Member Functions

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

Detailed Description

An Order (Order type) represents a Unit's current action and can be retrieved with UnitInterface::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.).

See also
UnitInterface::getOrder, Orders

Constructor & Destructor Documentation

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

Expected type constructor.

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.

idThe 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.

References BWAPI::Orders::allOrders().