UnitGroupNearestUnit
unit UnitGroupNearestUnit(unitgroup g, point p)
Nearest unit of the group from the point.
Parameters
- unitgroup g
Unit group
- point p
Point
Return value
unit -
- null: The unit group is either empty / null
- unit: The nearest unit of the group
Examples
- Example: Sample Usage
unitgroup UnitGroupAllUnits() { return UnitGroup(null, -1, null, null, 0); } unit u = UnitGroupNearestUnit( UnitGroupAllUnits(), Point(50, 50) ); // The nearest unit of the point (50, 50)