summaryrefslogtreecommitdiffstats
path: root/Common/Functions/Common_GetUnitsBelowHeight.sqf
blob: 1232042908bffb509285c34993a4748792062e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
Private["_belowUnits","_height","_min","_units","_z"];

_units = _this Select 0;
_height = _this Select 1;
_min = if (count _this > 2) then {_this select 2} else {-10};

_belowUnits = [];

{_z = getPos _x select 2;if (_z < _height && _z >= _min) then {_belowUnits = _belowUnits + [_x]}} ForEach _units;

_belowUnits