Advertisement
zSkullfox

Untitled

Jan 13th, 2019
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. /*
  2. Author: Skullfox
  3. Description:
  4. Attaches a pod to "Land_corridorpod"
  5.  
  6. Parameter(s):
  7. 0 Object: POD
  8. 1 (Optional) Object: Corridor
  9.  
  10. Returns:
  11. nothing
  12.  
  13.  
  14. [pod] execVM "fn_attachPod.sqf";
  15. [pod,corridor] execVM "fn_attachPod.sqf";
  16. */
  17.  
  18. _pod = param[0,objNull];
  19. _corridor = param[1,false];
  20.  
  21. if(_corridor isEqualTo false)then{
  22.  
  23. _corridors = nearestObjects [_pod, ["Land_corridorpod"],12];
  24. if( (count _corridors) isEqualTo 0 )exitWith{};
  25. if( count _corridors > 1)exitWith{};
  26. _corridor = _corridors select 0;
  27.  
  28. };
  29.  
  30. _pod attachTo [_corridor, [0,9,0]];
  31.  
  32.  
  33. [
  34. _pod,
  35. "<t color='#FF0000'>DETACH</t>",
  36. "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
  37. "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
  38. "driver _target == player",
  39. "driver _target == player",
  40. {
  41. params ["_target", "_caller", "_actionId", "_arguments"];
  42. _crew = crew _target;
  43. {
  44. if(isPlayer _x)then{
  45. ["Detach in progress"]remoteExec["hint",owner _x];
  46. };
  47. } forEach _crew;
  48.  
  49. },
  50. {
  51. params ["_target", "_caller", "_actionId", "_arguments", "_progress", "_maxProgress"];
  52. },
  53. {
  54. params ["_target", "_caller", "_actionId", "_arguments"];
  55. playSound3D ["A3\Missions_F_Bootcamp\data\sounds\assemble_target.wss", _target];
  56. detach _target;
  57.  
  58. [_target]spawn{
  59. sleep 1;
  60.  
  61. _effect = {
  62. _handle = ppEffectCreate ["radialBlur",100];
  63. _handle ppEffectEnable true;
  64. _handle ppEffectAdjust [0.04,0.05,0.35,0.2];
  65. _handle ppEffectCommit 1;
  66. waitUntil {ppEffectCommitted _handle};
  67. uiSleep 1;
  68. _handle ppEffectAdjust [0.0,0.0,0,0];
  69. _handle ppEffectCommit 0.5;
  70. waitUntil {ppEffectCommitted _handle};
  71. _handle ppEffectEnable false;
  72. ppEffectDestroy _handle;
  73. };
  74.  
  75. {
  76. if(isPlayer _x)then{
  77. [[],_effect]remoteExec["BIS_fnc_spawn",owner _x];
  78. };
  79. } forEach crew (_this select 0);
  80.  
  81. _vel = velocity (_this select 0);
  82. _dir = direction (_this select 0);
  83. _speed = 50; comment "Added speed";
  84. (_this select 0) setVelocity [
  85. (_vel select 0) + (sin _dir * _speed),
  86. (_vel select 1) + (cos _dir * _speed),
  87. (_vel select 2)
  88. ];
  89. }
  90. },
  91. {},
  92. [],
  93. 4,
  94. 10,
  95. true,
  96. false
  97. ] remoteExec ["BIS_fnc_holdActionAdd", 0];
  98.  
  99.  
  100.  
  101. [
  102. _pod,
  103. "<t color='#FF0000'>EMERGENCY CHUTE</t>",
  104. "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
  105. "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
  106. "driver _target == player && speed _target > 200 && ( (getpos _target select 2) < 300 )",
  107. "driver _target == player",
  108. {
  109. params ["_target", "_caller", "_actionId", "_arguments"];
  110.  
  111.  
  112. },
  113. {
  114. params ["_target", "_caller", "_actionId", "_arguments", "_progress", "_maxProgress"];
  115. },
  116. {
  117. params ["_target", "_caller", "_actionId", "_arguments"];
  118. playSound3D ["A3\Missions_F_Bootcamp\data\sounds\assemble_target.wss", _target];
  119.  
  120.  
  121.  
  122. [_target]spawn{
  123. playSound3D ["A3\Missions_F_Bootcamp\data\sounds\assemble_target.wss", (_this select 0)];
  124. _p = createVehicle ["B_Parachute_02_F", getpos (_this select 0), [], 0, ""];
  125. _d = getdir (_this select 0);
  126. (_this select 0) attachTo[_p,[0,0,0]];
  127. (_this select 0) setDir _d;
  128.  
  129. sleep 2;
  130. _effect = {
  131. _handle = ppEffectCreate ["radialBlur",100];
  132. _handle ppEffectEnable true;
  133. _handle ppEffectAdjust [0.04,0.05,0.35,0.2];
  134. _handle ppEffectCommit 1;
  135. waitUntil {ppEffectCommitted _handle};
  136. uiSleep 1;
  137. _handle ppEffectAdjust [0.0,0.0,0,0];
  138. _handle ppEffectCommit 0.5;
  139. waitUntil {ppEffectCommitted _handle};
  140. _handle ppEffectEnable false;
  141. ppEffectDestroy _handle;
  142. };
  143.  
  144. {
  145. if(isPlayer _x)then{
  146. [[],_effect]remoteExec["BIS_fnc_spawn",owner _x];
  147. };
  148. } forEach crew (_this select 0);
  149.  
  150. [(_this select 0),0]remoteExec["setfuel",0];
  151. waitUntil{getpos (_this select 0) select 2 < 2};
  152. detach (_this select 0);
  153. };
  154. },
  155. {},
  156. [],
  157. 1,
  158. 10,
  159. true,
  160. false
  161. ] remoteExec ["BIS_fnc_holdActionAdd", 0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement