Spawning random groups, in random positions with random waypoints - Arma 3 coding

Опубликовано: 07 Май 2026
на канале: Beetnick
282
3

Here is my attempt at.. what the title says...
It works but I wish the random waypoints were always held within the marker area (I tried the blacklist param but it didn't work?).

If you're curious about the code I wrote, here it is:
_markerArray = ["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"];

{
_banditGroups = ["BanditFireTeam", "BanditShockTeam"];
_randomBandits = _banditGroups select (random (count _banditGroups -1));
_spawnedGroups = [[getMarkerPos _x, [getMarkerSize _x select 0, getMarkerSize _x select 0, 0, false]] call bis_fnc_randomPosTrigger, independent, (configfile -- "CfgGroups" -- "Indep" -- "IND_C_F" -- "Infantry" -- _randomBandits)] call BIS_fnc_spawnGroup;
_patrol = getMarkerSize _x select 0;
_patrolX = _patrol / 2;
[_spawnedGroups, getMarkerPos _x, _patrolX] call BIS_fnc_taskPatrol;
} forEach _markerArray;

(replace the "--" with the "greater than" symbol. Youtube doesn't like it in the description)