while {isNil "mando_missile_init"} do
{
   Sleep 1 + random 2;
};

if (isServer) then
{
_disp = sam_1; // <<<<- This is the AI SAM unit
  _posunit = 0;
  _ttype = ["Air"];
  _quantity = 24;
  _minrange = 100;
  _maxrange = 3500;
  _rof = 8;
  _pos = [0,1,2];
  _scan = 360;
  _mink = 0;
  _enemies = [west,resistance,sideEnemy,civilian];

// Weak AI SAM with "obsolete missiles"
// Chage \mando_basicsam_unit2.sqs" by  \mando_patriot.sqs" if you wan a powerfull AI SAM instead of the obsolete one
  [_disp, _posunit, _ttype, _quantity, _minrange, _maxrange, _rof, _pos, _scan, _mink, _enemies, false, false, true, true]exec"mando_missiles\units\attackers\mando_patriot.sqs";

};

[ru1, 300, 10, 14, true]execVM"mando_missiles\units\mando_missileecm.sqf";

[ru2, 300, 10, 14, true]execVM"mando_missiles\units\mando_missileecm.sqf";

[ru3, 300, 10, 14, true]execVM"mando_missiles\units\mando_missileecm.sqf";

[am1, 200, 10, 18, true]execVM"mando_missiles\units\mando_missileecm.sqf";

[am2, 200, 10, 18, true]execVM"mando_missiles\units\mando_missileecm.sqf";

[am3, 200, 10, 18, true]execVM"mando_missiles\units\mando_missileecm.sqf";


["mk_eastai1", "mk_holde1"]execVM"mission\spawnsus.sqf";

["mk_westai1", "mk_holdw1"]execVM"mission\spawnattackharriers.sqf";


 // Su34s will have 10 flares and 2 missiles for the pilot (missile idx 0)
   [["Su34"], 0, "", [2,0], [2,0], 10, 10, "mando_missiles\units\mando_missilevehicle.sqf", false, true, false, false, [4,0,-2], "mando_missiles\units\keysets\mando_air1_keys.sqf", 5, 5, 2, 0]execVm"mando_missiles\units\mando_assignvehicle_by_type.sqf";

 [["KA50"], 0, "", [2,0], [2,0], 10, 10, "mando_missiles\units\mando_missilevehicle.sqf", false, true, false, false, [4,0,-2], "mando_missiles\units\keysets\mando_air1_keys.sqf", 5, 5, 2, 0]execVm"mando_missiles\units\mando_assignvehicle_by_type.sqf";

// AV8B2 will have 10 flares, 2 AA missiles and 4 LGB missiles for the pilot (starting with missile idx 0)
[["A10"], 0, "", [4,6], [4,6], 16, 16, "mando_missiles\units\mando_missilevehicle.sqf", true, true, true, true, [3,-2,-2.5], "mando_missiles\units\keysets\mando_air1_keys.sqf", 5, 10, 2, 0]execVm"mando_missiles\units\mando_assignvehicle_by_type.sqf";

[["AV8B2"], 0, "", [4,6], [4,6], 16, 16, "mando_missiles\units\mando_missilevehicle.sqf", true, true, true, true, [3,-2,-2.5], "mando_missiles\units\keysets\mando_air1_keys.sqf", 5, 10, 2, 0]execVm"mando_missiles\units\mando_assignvehicle_by_type.sqf";

Sleep 5;

