SC2Mapster.com Wiki

SC2 API / Functions / UnitTestState

UnitTestState

bool UnitTestState (unit u, int state);

Test state of the unit.

Parameters

unit u

Unit to get the type

int state

State of the unit. Can be one of

  • 14 (c_unitStateInsideTransport)

Return value

bool -

  • true: The unit is in the state
  • false: The unit is not in the state

Examples

Example: Sample Usage
bool IsInsideTransport(unit u) {
  return UnitTestState(u, c_unitStateInsideTransport);
}

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Mar 13, 2010

Author