Advertisement
EmuDevs

Arma 2 Operation Arrowhead - Possible Loss Custom Mission

Jul 10th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. /*
  2. * Possible Loss
  3. * by Tommy
  4. * Defend to survive!
  5. */
  6.  
  7. _spawnMarker1 = getMarkerPos "spawn1"; // Above
  8. _spawnMarker4 = getMarkerPos "spawn4"; // Below
  9. _wayMarker = getMarkerPos "way1"; // Centered (air field)
  10.  
  11. _unitName = "Mi17_TK_EP1";
  12. _pilotName = "TK_Soldier_Pilot_EP1";
  13.  
  14. _heliSpawnCount = 0;
  15. _grp1 = createGroup EAST;
  16. _grp4 = createGroup EAST;
  17.  
  18. _ammoMag = "2000Rnd_23mm_AZP85";
  19.  
  20. _cleanArray = [];
  21.  
  22. while {true} do
  23. {
  24. // Increment the counter
  25. _heliSpawnCount = _heliSpawnCount + 1;
  26.  
  27. // Create the first helicopter for the first group
  28. _heli1 = createVehicle[_unitName, _spawnMarker1, [], 0, "FLY"];
  29. // Etc..
  30. _heli4 = createVehicle[_unitName, _spawnMarker4, [], 0, "FLY"];
  31.  
  32. _cleanArray = _cleanArray + [_heli1, _heli4];
  33.  
  34. _pilotName createUnit [getPos _heli1, _grp1];
  35. _pilotName createUnit [getPos _heli4, _grp4];
  36.  
  37. {
  38. _x moveInDriver _heli1;
  39. _heli1 doMove(_wayMarker);
  40. } foreach units _grp1;
  41.  
  42. {
  43. _x moveInDriver _heli4;
  44. _heli4 doMove(_wayMarker);
  45. } foreach units _grp4;
  46.  
  47. switch (_heliSpawnCount) do
  48. {
  49. case 30:
  50. {
  51. hint "Lagging yet? Clean up time!";
  52. {
  53. deleteVehicle _x;
  54. } foreach _cleanArray;
  55. _heliSpawnCount = 0;
  56. };
  57. };
  58.  
  59. // Check ammo, need lots!
  60. if (vehicle player != player) then
  61. {
  62. _ammoCount = player ammo _ammoMag;
  63. if (_ammoCount < 500) then
  64. {
  65. vehicle player addMagazineTurret[_ammoMag, [0]];
  66. };
  67. };
  68.  
  69. // Need to pause spawning so they can get moving without crashing
  70. sleep 15;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement