SIlenceFiction 13 Posted June 20, 2015 Hello, I am looking for an auto parachute script, just like in King of The Hill. What I want it to do is, even if the unit doesn't have a parachute, if the unit ejects from a heli, they will have a parachute AND their backpack. Or just like in King of The Hill when there is no parachute equipped but it opens automatically at a certain altitude. Share this post Link to post Share on other sites
Beerkan 71 Posted June 27, 2015 BUMPs Don't Bump.. use a parachute Here's a simple autoparachute script. Stick this in your init.sqf waituntil {!(IsNull (findDisplay 46))}; _keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 57) then { if (!(isTouchingGround player) and (vehicle player == player)) then {[] spawn {player switchCamera 'EXTERNAL'; Player SwitchMove 'AswmPercMrunSnonWnonDf_AswmPercMstpSnonWnonDnon'; addCamShake [4, 2, 20];sleep 0.7; playSound3D ['@SCS\Sound\Parachute.ogg', Player, false, GetPosASL Player,5, 1, 250]; titleText ['', 'White IN', 0.6]; addCamShake [2, 2, 10]; chute = createVehicle ['Steerable_Parachute_F', position Player,[],0,'Fly']; chute setPos position player;player moveIndriver chute; chute allowDamage false;}; }; }"]; Basically what this does is for ANY player that is not touching the ground and THAT player is NOT in a vehicle, switch to the freefall animation. When the player presses the space bar, spawn a parachute, at the player, and move player into it. He keeps his backpack etc. When he lands parchute is replaced by the original backpack he jumped with. Simples.. *Credit for this stupidly brilliant and simple halodrop goes to ThunderBolt91 from ArmaHolic forums. 1 Share this post Link to post Share on other sites
SIlenceFiction 13 Posted June 29, 2015 Don't Bump.. use a parachute Here's a simple autoparachute script. Stick this in your init.sqf waituntil {!(IsNull (findDisplay 46))}; _keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 57) then { if (!(isTouchingGround player) and (vehicle player == player)) then {[] spawn {player switchCamera 'EXTERNAL'; Player SwitchMove 'AswmPercMrunSnonWnonDf_AswmPercMstpSnonWnonDnon'; addCamShake [4, 2, 20];sleep 0.7; playSound3D ['@SCS\Sound\Parachute.ogg', Player, false, GetPosASL Player,5, 1, 250]; titleText ['', 'White IN', 0.6]; addCamShake [2, 2, 10]; chute = createVehicle ['Steerable_Parachute_F', position Player,[],0,'Fly']; chute setPos position player;player moveIndriver chute; chute allowDamage false;}; }; }"]; Basically what this does is for ANY player that is not touching the ground and THAT player is NOT in a vehicle, switch to the freefall animation. When the player presses the space bar, spawn a parachute, at the player, and move player into it. He keeps his backpack etc. When he lands parchute is replaced by the original backpack he jumped with. Simples.. *Credit for this stupidly brilliant and simple halodrop goes to ThunderBolt91 from ArmaHolic forums. Thanks, I'll be sure to test it and tell update if it meets my needs. Share this post Link to post Share on other sites
dr death jm 117 Posted June 30, 2015 from my rpt file.... Error in expression <if (_this select 1 == 57) then { > 21:20:32 Error position: <if (_this select 1 == 57) then { > 21:20:32 Error Type Script, expected Bool Share this post Link to post Share on other sites
Beerkan 71 Posted June 30, 2015 (edited) Tested and working. Auto Parachute Script. Any player ejected from a plane/helo etc. (or indeed spawned in the air) will automatically be given a parachute @ 100m. Keeps backback and gear etc. No need to equip unit with a Parachute. Put this in your init.sqf //Auto ParaChute Proof of concept //by Beerkan //version Beta 0.82 [] spawn { while {true} do {private ['player','chute']; if ( (getPosATL player select 2 > 100) && (vehicle player IsEqualto player) && (alive player)) then { waitUntil {(position player select 2) <= 100}; addCamShake [8, 2, 20]; chute = createVehicle ['Steerable_Parachute_F', position Player, [], 0, 'FLY']; chute setPos position player; player moveIndriver chute; chute allowDamage false; }; sleep 2; }; }; Edited June 30, 2015 by Beerkan Oppsl forgot to take account of water.. Edited Share this post Link to post Share on other sites
dr death jm 117 Posted June 30, 2015 Tested and working.Auto Parachute Script. Any player ejected from a plane/helo etc. (or indeed spawned in the air) will automatically be given a parachute @ 100m. Keeps backback and gear etc. No need to equip unit with a Parachute. Put this in your init.sqf //Auto ParaChute Proof of concept //by Beerkan //version Beta 0.82 [] spawn { while {true} do {private ['player','chute']; if ( (getPosATL player select 2 > 100) && (vehicle player IsEqualto player) && (alive player)) then { waitUntil {(position player select 2) <= 100}; addCamShake [8, 2, 20]; chute = createVehicle ['Steerable_Parachute_F', position Player, [], 0, 'FLY']; chute setPos position player; player moveIndriver chute; chute allowDamage false; }; sleep 2; }; }; Error Generic error in expression 16:20:53 Error in expression < while {true} do {private ['player','chute']; if > 16:20:53 Error position: <private ['player','chute']; if > 16:20:53 Error Local variable in global space 16:20:53 Suspending not allowed in this context 16:20:53 Error in expression <wDamage false; }; sleep 2; }; > 16:20:53 Error position: <sleep 2; Share this post Link to post Share on other sites
HazJ 1289 Posted July 1, 2015 private ['player','chute']; Not sure that is correct... Remove this line unless "_player" and "_chute" exists in script then it should be: private ["_player", "_chute"]; I think, not 100% sure. :P Dirty Haz Share this post Link to post Share on other sites
dr death jm 117 Posted July 1, 2015 private ['player','chute']; Not sure that is correct... Remove this line unless "_player" and "_chute" exists in script then it should be: private ["_player", "_chute"]; I think, not 100% sure. :P Dirty Haz THANKS Dirty Haz and Beerkan (original script) I added an eject to action menu So now players can eject from heli pilot positions :cool: [] spawn { while {true} do {private ['_player','_chute']; if ( (getPosATL player select 2 > 100) && (vehicle player IsEqualto player) && (alive player)) then { waitUntil {(position player select 2) <= 100}; addCamShake [8, 2, 20]; chute = createVehicle ['Steerable_Parachute_F', position Player, [], 0, 'FLY']; chute setPos position player; player moveIndriver chute; chute allowDamage false; }; sleep 2; }; }; Share this post Link to post Share on other sites
HazJ 1289 Posted July 1, 2015 (edited) Morning! :) private ['_player','_chute']; You don't need this because "_player" and "_chute" does not exist in the script. Dirty Haz Edit: Instead of making a new thread, I'll ask here. There is no "Eject" EH that I can see (Wiki) and "GetOut" does not work (I don't think) when you just "Eject" from a vehicle so, is there any other solution without making another action? Dirty Haz Edit 2: Haz_Func_Eject.sqf : Haz_Func_Eject = compile PreProcessFileLineNumbers "Functions\Haz_Func_Eject.sqf"; // Created by: Haz private ["_Vehicle", "_Position", "_Unit", "_Chute"]; _Vehicle = [_this, 0, objNull] call BIS_fnc_param; _Position = [_this, 1, objNull] call BIS_fnc_param; _Unit = [_this, 2, objNull] call BIS_fnc_param; if (getPos _Unit select 2 >= 75 && alive _Unit) then { _Chute = createVehicle ["Steerable_Parachute_F", position _Unit, [], 0, "FLY"]; _Unit moveInDriver _Chute; _Unit allowDamage false; _Chute allowDamage false; waitUntil {getPos _Unit select 2 <= 25}; _Unit allowDamage true; waitUntil {getPos _Unit select 2 <= 2 || !alive _Unit}; deleteVehicle _Chute; }; player addEventHandler ["GetOut", Haz_Func_Eject]; Am I doing something wrong or does "GetOut" not work count for ejecting? Dirty Haz Edited July 1, 2015 by Dirty Haz Edit 2 Share this post Link to post Share on other sites
Diveyez 12 Posted January 14, 2019 Any one got luck with cutting parachutes to prevent wind from dragging players? Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted January 19, 2019 On 14/1/2019 at 5:30 AM, Div3y3z said: Any one got luck with cutting parachutes to prevent wind from dragging players? If i remember right there is already this for : Share this post Link to post Share on other sites
Mr H. 402 Posted January 20, 2019 On 14/01/2019 at 4:30 AM, Div3y3z said: Any one got luck with cutting parachutes to prevent wind from dragging players? if (vehicle player isKindOf 'Steerable_Parachute_F') then {private "_para" = vehicle player; moveOut player; deleteVehicle _para}; put it wherever you want the parachute to be removed (untested) 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted January 20, 2019 9 minutes ago, Mr H. said: put it wherever you want the parachute to be removed Nice Mr H. ! 1 Share this post Link to post Share on other sites