_marker      = _this select 0;
_markermove  = _this select 1;


_group     = grpNull;
_leader    = objNull;
_at1       = objNull;
_at2       = objNull;
_mg        = objNull;
_sol1      = objNull;
_sol2      = objNull;
_sol3      = objNull;
_med       = objNull;

_units     = [];

while {true} do
{
   _units     = [];
   _group = createGroup west;


   _group addWaypoint [getMarkerPos _markermove, 0];

   [_group, 1] setWaypointType "SAD";
   [_group, 1] setWaypointFormation "COLUMN";
   [_group, 1] setWaypointBehaviour "SAFE";
   [_group, 1] setWaypointCombatMode "RED";

      _leader = _group createUnit ["SquadleaderW", [getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _leader setskill 0.6;
      _leader setBehaviour "AWARE";
      _leader setrank "SERGEANT";
      _units = _units + [_leader];
      
      Sleep 1;

      _at1 = _group createUnit ["SoldierWAT", [getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _at1 setRank "CORPORAL";
      _at1 setskill 0.5;
      _at1 setBehaviour "AWARE";
      _units = _units + [_at1];
      
      Sleep 1;
      
      _at2 = _group createUnit ["SoldierWAT",[getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _at2 setRank "PRIVATE";
      _at2 setskill 0.4;
      _at2 setBehaviour "AWARE";
      _units = _units + [_at2];
      
      Sleep 1;
      
      _mg = _group createUnit ["SoldierWMG",[getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _mg setRank "CORPORAL";
      _mg setskill 0.7;
      _mg setBehaviour "AWARE";
      _units = _units + [_mg];
      
      Sleep 1;
      
      _sol1 = _group createUnit ["SoldierWG",[getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _sol1 setRank "PRIVATE";
      _sol1 setskill 0.4;
      _sol1 setBehaviour "AWARE";
      _units = _units + [_sol1];
      
      Sleep 1;
      
      _sol2 = _group createUnit ["SoldierWB",[getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _sol2 setRank "PRIVATE";
      _sol2 setskill 0.4;
      _sol2 setBehaviour "AWARE";
      _units = _units + [_sol2];
      
      Sleep 1;
      
      _sol3 = _group createUnit ["SoldierWAA",[getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _sol3 setRank "PRIVATE";
      _sol3 setskill 0.4;
      _sol3 setBehaviour "AWARE";
      _units = _units + [_sol3];
      
      Sleep 1;
      
      _med = _group createUnit ["SoldierWMEDIC",[getmarkerpos _marker select 0, getmarkerpos _marker select 1, 0], [], 0, "NONE"];
      _med setRank "PRIVATE";
      _med setskill 0.4;
      _med setBehaviour "AWARE";
      _units = _units + [_med];
      
      Sleep 1;


   processInitCommands;

   while {(count _units) > 0} do
   {
      Sleep 15;
   };

   Sleep 120;   
   {deleteVehicle _x} forEach _units;
   deleteGroup _group;
   Sleep 20;
};
