UnitGroupTestPlane
bool UnitGroupTestPlane(unitgroup g, int plane)
Does the group contain a unit in the plane.
Parameters
- unitgroup g
The group.
- int plane
- 0 (c_planeGround): A ground unit
- 1 (c_planeAir): A air unit
Return value
bool -
- true: The group contains at least a unit in the plane.
- false: The plane is invalid or the group does not contain any unit in the plane.
Examples
- Example: Sample Usage
// Select all the motherships (flying units) of the map unitgroup g = UnitGroupFilter("Mothership", -1, g, null, 0); bool b = UnitGroupTestPlane(g, c_planeGround); // false, there is no ground unit in the group b = UnitGroupTestPlane(g, c_planeAir); // true if there is at least one mothership in the group