Scrumpy_Jacks

Arma 3 Operation First Light

Mar 4th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. #include "Zen_FrameworkFunctions\Zen_InitHeader.sqf"
  2.  
  3. // <Your mission name here> by <your name here>
  4. // Version = <the date here>
  5. // Tested with ArmA 3 -- <version number>
  6. //
  7.  
  8. //
  9. // Notes
  10. //
  11. // Add Patrols to town area
  12. // Add building patrols to town
  13. // Possibly add a road block on main road before the town
  14. // Add a last objective no extractions i would like the next mission to follow were the mission ends
  15. // Change editor based heli and use zens order insertion and use zens order fast rope
  16. // And weather to mission early morning with morning fog and leading to a bright sunny day
  17. // Add an enemy counter attack once the captives have been rescued
  18. //
  19.  
  20. Zen_Print_All_Errors = true;
  21. Zen_Debug_Arguments = true;
  22.  
  23. [] spawn
  24. {
  25. while {true} do
  26. {
  27. player setFatigue 0;
  28. sleep 0.1;
  29. };
  30. };
  31.  
  32. #define AI_SKILL "infantry"
  33.  
  34. enableSaving [false, false];
  35.  
  36. Player creatediaryRecord["Diary", ["some text"]];
  37.  
  38. // All clients stop executing here, do not delete this line
  39.  
  40. _X11 = group X11;
  41.  
  42. _allplayersArray = units _X11;
  43.  
  44. 0 = [_allplayersArray] call Zen_AddGiveMagazine;
  45. 0 = [_allplayersArray] call Zen_AddRepackMagazines;
  46.  
  47. 0 = [_allplayersArray] call Zen_TrackInfantry;
  48.  
  49. {_x setMarkerAlpha 0;} forEach ["officer", "Captive", "Valley", "Valley_1, "RoadPatrol", "RoadPatrol_1", "Town"];
  50.  
  51. if (!isServer) exitWith {};
  52. sleep 1;
  53.  
  54. _ValleyPatrols = [];
  55. {
  56. _Valley_patrol = [];
  57. for "_i" from 0 to 2 do {
  58. _Valleygroup = [([_x] call Zen_FindGroundPosition), resistance, AI_SKILL, [4,8]] call Zen_SpawnInfantry;
  59. 0 = [_Valley_patrol, _Valleygroup] call Zen_ArrayAppend;
  60. };
  61. 0 = [_ValleyPatrols, _Valley_patrol] call Zen_ArrayAppendNested;
  62. 0 = [_Valley_patrol, _x, [], 0, "limited", "safe"] spawn Zen_OrderInfantryPatrol;
  63. 0 = [_Valley_patrol, ["Team Leader", "rifleman", "grenadier", "Auto Rifleman", "Assistant AR", "Medic"]] call Zen_GiveLoadoutIndfor;
  64. } forEach ["Valley", "Valley_1"];
  65.  
  66. _RoadPatrols = [];
  67. {
  68. _Road_patrol = [];
  69. for "_i" from 0 to 1 do {
  70. _Roadgroup = [([_x,0,0,1,[2,0]] call Zen_FindGroundPosition), resistance, AI_SKILL, [2,4]] call Zen_SpawnInfantry;
  71. 0 = [_Road_patrol, _Roadgroup] call Zen_ArrayAppend;
  72. };
  73. 0 = [_RoadPatrols, _Road_patrol] call Zen_ArrayAppendNested;
  74. 0 = [_Road_patrol, _x, [], 0, "limited", "safe"] spawn Zen_OrderInfantryPatrol;
  75. 0 = [_Road_patrol, ["Team Leader", "rifleman", "grenadier", "Auto Rifleman", "Assistant AR", "Medic"]] call Zen_GiveLoadoutIndfor;
  76. } forEach ["RoadPatrol", "RoadPatrol_1"];
  77.  
  78. _returnArray = [(_RoadPatrols + _ValleyPatrols), "group"] call Zen_TrackInfantry;
  79.  
  80. _OfficerPos = ["officer"] call Zen_FindGroundPosition;
  81. _OfficerObjective = [_OfficerPos, (group X11), resistance, "Officer","eliminate"] call Zen_CreateObjective;
  82. _warlord = (_OfficerObjective select 0) select 0;
  83.  
  84. _innerGuardsGroupArray = [];
  85. _outerGuardsGroupArray = [];
  86.  
  87. for "_i" from 0 to 1 do {
  88. _innerPos = [_OfficerPos, [10,70]] call Zen_FindGroundPosition;
  89. _innerGuard = [_innerPos, resistance, AI_SKILL, [2,3]] call Zen_SpawnInfantry;
  90. _innerGuardsGroupArray set [(count _innerGuardsGroupArray), _InnerGuard];
  91. };
  92.  
  93. 0 = [_innerGuardsGroupArray, _OfficerPos, [10,70]] spawn Zen_OrderInfantryPatrol;
  94.  
  95. for [{_i=0}, {_i<4}, {_i=_i+1}] do {
  96. _outerPos = [_OfficerPos, [130,220]] call Zen_FindGroundPosition;
  97. _outerGuard = [_outerPos, resistance, AI_SKILL, [4,6]] call Zen_SpawnInfantry;
  98. _outerGuardsGroupArray set [(count _outerGuardsGroupArray), _outerGuard];
  99. };
  100.  
  101. 0 = [_outerGuardsGroupArray, _OfficerPos, [130,220]] spawn Zen_OrderInfantryPatrol;
  102. _returnArray = [(_innerGuardsGroupArray + _outerGuardsGroupArray), "group"] call Zen_TrackInfantry;
  103.  
  104. waituntil { sleep 2; !(alive _warlord) };
  105.  
  106. _taskIntel = [_X11, "Get to the warlord's body and take the intel.", "Secure Intel", _warlord] call Zen_InvokeTask;
  107.  
  108. ZEN_FMW_Code_WaitDistanceLess(X11, _warlord, 2)
  109. sleep 2;
  110. 0 = [_taskIntel, "succeeded"] call Zen_UpdateTask;
  111.  
  112. _captivePos = ["Captive"] call Zen_FindGroundPosition;
  113. _captiveObjective = [_captivePos, (group X11), west, "custom", "rescue", ["B_Soldier_F", "B_Soldier_F"]] call Zen_CreateObjective;
  114.  
  115. _CaptiveGroup = ["Captive", ["I_soldier_F", "I_Soldier_GL_F"]] call Zen_SpawnGroup;
  116.  
  117. waitUntil {
  118. sleep 2;
  119. ([(_captiveObjective select 1)] call Zen_AreTasksComplete)
  120. };
  121.  
  122. endMission "end1";
Add Comment
Please, Sign In to add comment