Advertisement
KRDucky

test

Feb 7th, 2016
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. // ******************************************************************************************
  2. // * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
  3. // ******************************************************************************************
  4. // @file Version: 1.0
  5. // @file Name: mission_AirWreck.sqf
  6. // @file Author: [404] Deadbeat, [404] Costlyy, AgentRev
  7. // @file Created: 08/12/2012 15:19
  8.  
  9. if (!isServer) exitwith {};
  10. #include "sideMissionDefines.sqf"
  11.  
  12. private ["_nbUnits", "_wreckPos", "_wreck", "_box1", "_box2"];
  13.  
  14. _setupVars =
  15. {
  16. _missionType = "Aircraft Wreck";
  17. _locationsArray = MissionSpawnMarkers;
  18. _nbUnits = if (missionDifficultyHard) then { AI_GROUP_LARGE } else { AI_GROUP_MEDIUM };
  19. _box1 = ["mission_USSpecial", "mission_RUSpecial"] call BIS_fnc_selectRandom;
  20. _box2 = ["mission_USLaunchers", "mission_RULaunchers"] call BIS_fnc_selectRandom;
  21. };
  22.  
  23. _setupObjects =
  24. {
  25. _missionPos = markerPos _missionLocation;
  26. _wreckPos = _missionPos vectorAdd ([[25 + random 20, 0, 0], random 360] call BIS_fnc_rotateVector2D);
  27.  
  28. // Class, Position, Fuel, Ammo, Damage, Special
  29. _wreck = ["O_Heli_Light_02_unarmed_F", _wreckPos, 0, 0, 1] call createMissionVehicle;
  30.  
  31. _box1 = createVehicle ["Box_NATO_WpsSpecial_F", _missionPos, [], 5, "None"];
  32. _box1 setDir random 360;
  33. _box1 call fn_refillbox;
  34.  
  35. _box2 = createVehicle ["Box_East_WpsSpecial_F", _missionPos, [], 5, "None"];
  36. _box2 setDir random 360;
  37. _box2 call fn_refillbox;
  38.  
  39. { _x setVariable ["R3F_LOG_disabled", true, true] } forEach [_box1, _box2];
  40.  
  41. _aiGroup = createGroup CIVILIAN;
  42. [_aiGroup, _missionPos, _nbUnits] call createCustomGroup;
  43.  
  44. _missionPicture = getText (configFile >> "CfgVehicles" >> typeOf _wreck >> "picture");
  45. _missionHintText = "A helicopter has come down under enemy fire!";
  46. };
  47.  
  48. _waitUntilMarkerPos = nil;
  49. _waitUntilExec = nil;
  50. _waitUntilCondition = nil;
  51.  
  52. _failedExec =
  53. {
  54. // Mission failed
  55. { deleteVehicle _x } forEach [_box1, _box2, _wreck];
  56. };
  57.  
  58. _successExec =
  59. {
  60. // Mission completed
  61. { _x setVariable ["R3F_LOG_disabled", false, true] } forEach [_box1, _box2];
  62. deleteVehicle _wreck;
  63.  
  64. _successHintMessage = "The airwreck supplies have been collected, well done.";
  65. };
  66.  
  67. _this call sideMissionProcessor;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement