BWAPI
|
#include <Unit.h>
Direct data mapping of the broodwar unit structure. Most of the information here is derived from http://farty1billion.dyndns.org/EUDDB/?pg=ref&a=unitnode Values marked
Unknown are labeled as the EUDDB has them labeled, but the true meaning is not understood. Values marked
Verify have known meanings, but are not confirmed.
bool BW::Unit::movementFlag | ( | u8 | flags | ) | const |
bool BW::Unit::statusFlag | ( | u32 | flags | ) | const |
BWAPI::UnitType BW::Unit::type | ( | ) | const |
union { ... } |
union { ... } |
verified
struct { ... } BW::Unit::beacon |
struct { ... } BW::Unit::building |
Queue of units to build. Note that it doesn't begin with index 0, but with buildQueueSlot index.
Index of active unit in buildQueue.
void* BW::Unit::CAIControl |
struct { ... } BW::Unit::carrier |
Addon is connected to building (addon has connected building, but not in other direction
POINT BW::Unit::current_speed |
The current direction the unit is facing
(mapsizex/1.5 max)
(mapsizex/1.5 max)
Energy Points
struct { ... } BW::Unit::ghost |
connected nydius canal
verified
POINT BW::Unit::halt |
struct { ... } BW::Unit::hatchery |
Hit points of unit, note that the displayed value in broodwar is ceil(healthPoints/256)
struct { ... } BW::Unit::interceptor |
Killcount
Flags specifying movement type - defined in BW::MovementFlags.
Pointer to next unit in the unit linked list, we use it to iterate units.
The next way point in the path the unit is following to get to its destination. Equal to moveToPos for air units since they don't need to navigate around buildings or other units.
The desired position
struct { ... } BW::Unit::nydus |
When the unit is resource container
Specification of type of order currently given.
Additional order info (mostly unknown, wander property investigated so far)
POINTS BW::Unit::origin |
Specification of owner of this unit.
Current position of the unit
POINTS BW::Unit::position |
struct { ... } BW::Unit::powerup |
struct { ... } BW::Unit::pylon |
struct { ... } BW::Unit::pylon |
If the unit is rally type
struct { ... } BW::Unit::rally |
Adds this value to the unit's base rank
Remaining bulding time; This is also the timer for powerups (flags) to return to their original location.
Verified for Hallucination, DWeb, Scarab, DSwarm, and Broodling; does not apply to scanner sweep
struct { ... } BW::Unit::resource |
Resource being held by worker: 1 = gas, 2 = ore
(Build addon verified)
Bw shows this value/256
struct { ... } BW::Unit::silo |
struct { ... } BW::Unit::status |
A byte used to determine the target ID for the unit
POINTS BW::Unit::targetResource |
Specifies the type of unit.
This usually only differs from the currentDirection field for units that can accelerate and travel in a different direction than they are facing. For example Mutalisks can change the direction they are facing faster than then can change the direction they are moving.
struct { ... } BW::Unit::vulture |
struct { ... } BW::Unit::worker |