/*
   Author: IT07

   Description:
   A simple mission for VEMFr that send a chopper to a player's territory and paradrops all units inside
*/

if isNil"VEMFrAttackCount" then { VEMFrAttackCount = 0 };
VEMFrAttackCount = VEMFrAttackCount + 1;
_missionName = param [0, "", [""]];
_settings = [[_missionName],["heliTypes"]] call VEMFr_fnc_getSetting;
_heliTypes = _settings select 0;
if (count _heliTypes > 0) then
{ // Just in case
   _bases = [];
   private ["_target"];
   _areNearFlag = [];
   {
      if (speed _x < 25) then
      {
         _loc = nearestLocation [position _x, "ExileTerritory"];
         if not isNull _loc then
         {
            _bases pushBackUnique _loc;
         };
      };
   } forEach allPlayers;
   if (count _bases > 0) then
   {
      _baseToAttack = selectRandom _bases;
      _pos = locationPosition _baseToAttack;
   };
};
//Exile_Construction_Flag_Static
