Advertisement
Guest User

Untitled

a guest
Sep 4th, 2019
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.06 KB | None | 0 0
  1. _unitTypes = ["rhs_vdv_flora_sergeant","rhs_vdv_flora_rifleman","rhs_vdv_flora_rifleman","rhs_vdv_flora_marksman","rhs_vdv_flora_efreitor","rhs_vdv_flora_at","rhs_vdv_flora_junior_sergeant","rhs_vdv_flora_LAT","rhs_vdv_flora_rifleman"];
  2. _posAI = [AISpawn_0,AISpawn_1,AISpawn_2,AISpawn_3,AISpawn_4];
  3.  
  4. _aliveGroups = [];
  5.  
  6. while{alive player} do
  7. {
  8.   if(count _aliveGroups < 8) then
  9.   {
  10.     _position = position (selectRandom _posAI);
  11.     _group = createGroup east;
  12.  
  13.     for "_i" from 0 to (count _unitTypes - 1)  step 1 do
  14.     {
  15.       _unitType = (_unitTypes select _i);
  16.       _unit = _group createUnit [_unitType, _position, [], 0, "FORM"];
  17.       sleep (1/10);
  18.     };
  19.  
  20.     _newPos = MoveTarget getRelPos [random 50, random 360];
  21.     _group move _newPos;
  22.     _group setSpeedMode "FULL";
  23.  
  24.     _aliveGroups pushBack _group;
  25.     sleep 1;
  26.   }
  27.   else
  28.   {
  29.     {
  30.       if({Alive _X} count units _x < 5) then
  31.       {
  32.         _aliveGroups deleteAt (_aliveGroups find _x);
  33.         hint "new group";
  34.       }
  35.     }forEach _aliveGroups;
  36.   };
  37.  
  38.   sleep (1/10);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement