so in der art sollte es klappen
Code:
// Total Spiderholes VC
vcHoles = 5;
_delay = 1;
_vchMarker = ["h1","h2","h3","h4","h5","h6","h7","h8","h9","h10"];
_vchGroups = [];
for "_i" from 1 to vcholes do
{
// random Hole auswaehlen und aus array loeschen
_currentHole = _vchmarker select (floor (random (count _vchmarker)));
_vchmarker = _vchmarker - [_currentHole];
// vc hole erstellen
sleep _delay;
_hole = createVehicle ["LAND_uns_spiderhole4c", getMarkerPos _currentHole, [],0, "NONE"];
hintSilent str getPos _hole;
// neue vc gruppe erstellen und in array speichern fuer spaetere weitere verarbeitung
_vcsquad = createGroup east;
_vchGroups = _vchGroups + [_vcsquad];
// Squadleader erstellen
_vcsoldier = _vcsquad createUnit ["uns_local_vc2b", (getPos _hole), [], 0, "FORM"];
};
// units erstellen und waypoints
{
_x createUnit ....
.
.
.
_wp = _x addWaypoint [[x,y], 0];
_wp setWaypointType "sad";
} forEach _vchGroups