Hi.
I am trying to write a simple script that'll move selected groups to one of a selection of random markers on the map. i have a script that i have yet to test (don't have arma on this machine) but i cannot figure how to make sure the group doesn't teleport onto the exact same spot.
i was thinking of using a trigger to initialize this script.
//simple script to move a group to a random marker
if !(isServer) exitWith {};
private ["_groups", "_groupchosen", "_markers", "_totalmarkers", "i", "_chosenmarker", "_units"];
_groups = ["west1","east1"];
_groupchosen = _groups select 0;
_markers = ["1start","2start","3start"];//defined in editor
_totalmarkers = count _markers;
_i = random _totalmarkers;
_chosenmarker = _markers select _i;
_groupchosen setPos (getPos _chosenmarker);
{_units = _x; _x setPos (getPos _chosenmarker);
} forEach units _groupchosen;
_groupchosen setCombatMode "YELLOW";
_groupchosen setSpeedMode "FULL";
_groupchosen setFormation "LINE";