arma3_missions/helotraining_mp.Altis/selectLZ.sqf
Eero af Heurlin dfa0e68e7b
Merge mijas improvements and my fixes (#8)
* mija changes (#7)

mijas changes

* separate players into their own groups

* fix some leftover typos and sort actions by priority

Co-authored-by: mija <i.see.living.people@gmail.com>
2021-06-24 17:16:32 +03:00

17 lines
590 B
Plaintext

params [["_excludeList", []]];
private _candidates = lzList;
if (_excludeList isEqualType []) then
{
_candidates = _candidates - _excludeList;
};
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
}