_markers = ["spawnpoint1", "spawnpoint2", "spawnpoint3"];

for "_i" from 0 to 2 do
{
_pos = markerPos (_markers select _i);
_grp1 = [_pos, EAST, ["TK_Soldier_MG_EP1", "RU_Soldier_HAT", "RU_Soldier_LAT","T55_TK_EP1"]] call BIS_fnc_spawnGroup;
_wp1 = _grp1 addWaypoint [(getMarkerPos "wegpunkt"), 0]; 
_wp1 	setWaypointType "SAD";
_wp1    setWaypointType "MOVE";
_wp1    setWaypointStatements ["true", ""];

// Zerstörte einheiten löschen 
{
if (side _x == east) then {
_x addEventHandler ["killed",{handle = (_this select 0) execVM "scripts\deletevehicle.sqf"}];
};
} foreach allUnits;

// Ende Löschscript
waitUntil {{alive _x} count units _grp1 == 0};
};

