arma3_missions/helotraining_mp.Altis/selectLZ.sqf

17 lines
590 B
Plaintext
Raw Normal View History

params [["_excludeList", []]];
2016-07-25 23:01:42 +00:00
private _candidates = lzList;
2016-07-25 23:01:42 +00:00
if (_excludeList isEqualType []) then
{
_candidates = _candidates - _excludeList;
};
2016-07-25 23:01:42 +00:00
private _taskLocations = [west] call getSideActiveTasks apply { [_x] call BIS_fnc_taskDestination };
for "_i" from 0 to LZCOUNT do {
private _candidate = selectRandom _candidates;
if (_taskLocations findIf { _x distance _candidate < LZMinDistace } == -1 && { allPlayers findIf { _x distance _candidate > LZMaxDistace } == -1 } && { allPlayers findIf { _x distance _candidate < 200 } == -1 }) exitWith { _candidate };
false
}