Advertisement
OCBValour

Arma 3 | MGI Halo Jump Script

Apr 9th, 2022
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. //Create a file called mgi_jump.sqf and place it into your mission folder. Paste the below into it and save it.
  2.  
  3. // _halo_jump =[1500,0,this] execVM "scripts\MGI_HALO.sqf";
  4.  
  5.  
  6. jump_alt = _this select 0;
  7. jump_safety = _this select 1;
  8. _pole1 = _this select 2;
  9. fnc_orient = {_obj = _this select 0;
  10. _y = _this select 1;
  11. _p = _this select 2;
  12. _r = _this select 3;
  13. _a = _this select 4;
  14. _b = _this select 5;
  15. _c = _this select 6;
  16. _obj setVectorDirAndUp [
  17. [ sin _y * cos _p,cos _y * cos _p,sin _p],
  18. [[ sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D
  19. ]
  20. };
  21. _pole1 addAction ["<t color='#ff9900'>Click here for Halo Drop</t>",{
  22. openmap [true,false];
  23. titleText["Select Halo Position", "PLAIN"];
  24. bpk = createVehicle ["WeaponHolderSimulated",getPosATL player,[],0,"CAN_COLLIDE"];
  25. if (backpack player !="") then {
  26. bpk addBackpackCargoGlobal [backpack player, 1];
  27. [] spawn {
  28. ["chute_bpk", "onEachFrame", {
  29. if (!isNull bpk) then {
  30. call{
  31. if (stance player == "UNDEFINED") exitWith {
  32. bpk attachTo [player,[-0.1,-0.05,-0.7],'leaning_axis'];
  33. [bpk,0,-180,0,0,0,0] remoteExec ["fnc_orient"]};
  34. if (stance player == "STAND") exitWith {
  35. bpk attachTo [player,[-0.1,0.75,-0.05],'leaning_axis'];
  36. [bpk,0,-90,0,0,0,0] remoteExec ["fnc_orient"]};
  37. };
  38. };
  39. }] call BIS_fnc_addStackedEventHandler;
  40. };
  41. };
  42. onMapSingleClick "player setPos [_pos select 0,_pos select 1, jump_alt];
  43. [player, [missionNamespace, 'inv']] call BIS_fnc_saveInventory;
  44. player setVariable ['MGI_ammo1',player ammo (primaryWeapon player)];
  45. player setVariable ['MGI_ammo2',player ammo (handgunWeapon player)];
  46. player setVariable ['MGI_ammo3',player ammo (secondaryWeapon player)];
  47. player setVariable ['MGI_mags',magazinesAmmoFull player];
  48. player setVariable ['MGI_weapon',currentWeapon player];
  49. removeBackpackGlobal player;
  50. player addBackpack 'B_parachute';
  51. openmap [false,false];
  52. [] spawn {
  53. player switchcamera 'external';
  54. titleCut ['', 'BLACK in', 4];
  55. player say3d ['para', 150,1];
  56. enableCamShake true;
  57. addcamshake [1,200,100];
  58. showcinemaborder false;
  59. 'dynamicBlur' ppEffectEnable true;
  60. 'dynamicBlur' ppEffectAdjust [13];
  61. 'dynamicBlur' ppEffectCommit 0;
  62. 'dynamicBlur' ppEffectAdjust [0.0];
  63. 'dynamicBlur' ppEffectCommit 6;
  64.  
  65. any= ['Halo drop: 2000mtrs','Wind speed: 138km/h',' 16.0°C (64°F/304 °K)','Visibility: 2200 mtrs']spawn BIS_fnc_infotext;
  66. };
  67. [] spawn {
  68. waitUntil {(getpos player select 2) < jump_safety or isTouchingGround player};
  69. if (!isTouchingGround player) then {player action ['OpenParachute', player]};
  70. waitUntil {isTouchingGround player};
  71. player switchcamera 'internal';
  72. resetCamshake;
  73. if (!isnull bpk) then {
  74. detach bpk;
  75. deleteVehicle bpk};
  76. sleep 2;
  77. if (alive player) then {
  78. [
  79. (getpos player) call BIS_fnc_locationDescription,
  80. format ['%1/%2/%3', (date select 0), (date select 1), (date select 2)],
  81. format ['%1', ([daytime, 'HH:MM'] call BIS_fnc_timeToString)]
  82.  
  83. ] spawn BIS_fnc_infotext;
  84.  
  85.  
  86. [player, [missionNamespace, 'inv']] call BIS_fnc_loadInventory;
  87. {player removeMagazine _x} forEach magazines player;
  88. player setAmmo [primaryWeapon player, 0];
  89. player setAmmo [handGunWeapon player, 0];
  90. player setAmmo [secondaryWeapon player, 0];
  91. {if (((player getVariable 'MGI_mags') select _foreachindex select 3) <= 0) then {
  92. player addMagazine [_x select 0,_x select 1]}} forEach (player getVariable 'MGI_mags');
  93. player setAmmo [primaryWeapon player,player getVariable 'MGI_ammo1'];
  94. player setAmmo [handGunWeapon player,player getVariable 'MGI_ammo2'];
  95. player setAmmo [secondaryWeapon player,player getVariable 'MGI_ammo3'];
  96. player selectWeapon (player getVariable 'MGI_weapon')
  97. };
  98. }
  99. onMapSingleClick '';
  100. false"},nil, 5,false, true,"","vehicle _this == _this"];
  101.  
  102.  
  103.  
  104.  
  105.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement