SC2Mapster.com Wiki

SC2 API / Functions / UnitGroupFilterPlane

UnitGroupFilter

unitgroup UnitGroupFilterPlane(unitgroup g, int plane, int max)

Filter a unit group by plane (ground, air).

Parameters

unitgroup g

Original unit group

int plane
  • 0 (c_planeGround)
  • 1 (c_planeAir)
int max
  • 0: No maximum
  • n: Maximum number of units in the group.

Examples

Example: Sample Usage
unitgroup UnitGroupAllUnits() {
  return UnitGroup(null, -1, null, null, 0);
}

g = UnitGroupFilterPlane(UnitGroupAllUnits(), c_planeAir, 0);
// Select all air units of the map

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

Facts

Date created
Mar 27, 2010
Last updated
Mar 27, 2010

Author