mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
dfa0e68e7b
* 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>
17 lines
590 B
Plaintext
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
|
|
}
|