Advertisement
Guest User

Untitled

a guest
May 15th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.76 KB | None | 0 0
  1.  
  2. // File: fn_slingParachute.sqf
  3. // Author: Gen. Henry Arnold
  4. // Description: Create safety parachute for slingloaded objects
  5.  
  6. // Parameters
  7. if !(params ["_vehicle", "_rope", "_cargo"]) exitWith {};
  8.  
  9. // Error checks
  10. // if !((22 in life_talents) || ((side player) in [west,independent])) exitWith {};
  11. if ((isNull _cargo) || (isNull _vehicle) || (!alive _cargo) || (!alive _vehicle || !(_vehicle isKindOf "AIR")) exitWith {};
  12. if (((getPosATL _cargo) select 2) <= 50) exitWith {};
  13.  
  14. // Wait
  15. uiSleep 1;
  16.  
  17. // Check if cargo already has a parachute
  18. if (({(typeOf _x) isEqualTo "B_Parachute_02_F"} count (attachedObjects _cargo)) isEqualTo 0) then {
  19.     private _parachute = "B_Parachute_02_F" createVehicle (position _cargo);
  20.     _cargo attachTo [_parachute, [0,0,1]];
  21. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement