Jump to content
Beerkan

Simple ParaDrop Script

Recommended Posts

...All you have to do to stop the explosions is to not allow the parachute to take any damage.

(vehicle player) allowdamage false

Now you can slam into the ground at 60mph and not turn into a giant fireball of awesomeness!!!

Thanks cobra4v320. Original post updated and credited. :D

Share this post


Link to post
Share on other sites
Thanks cobra4v320. Original post updated and credited. :D

Thanks Beerkan. I'm going to link to this page under my signature for people to hopefully find easier. If BI ever fixes the explosions the script will need to be edited again.

Share this post


Link to post
Share on other sites

Beerkan, is it possible to drop multiple groups?

I'm trying to drop 3 groups from a C130 but I can't figure out how the right format.

This is a nogo: _drop =["oparag1,oparag2,oparag3",c13,45] execVM "scripts\eject.sqf";

Share this post


Link to post
Share on other sites

0 = [oparag1 , c13, 45] execVM "eject.sqf"

0 = [oparag2 , c13, 45] execVM "eject.sqf"

0 = [oparag3 , c13, 45] execVM "eject.sqf"

I would shit my pants if my chute opened around 45.

Share this post


Link to post
Share on other sites

To have something smooth to land on Cobra? ;)

"Despite a severe opening shock, the 1940s-50s Paratroopers were able to jump as low as 143 feet in training, and 250 feet in actual combat."

http://www.combatreform.org/llparachute.htm

Thanks a lot for the script bit.

---------- Post added at 08:13 ---------- Previous post was at 07:43 ----------

By the way, I want to paradrop crewed vehicles (soviet style!), is it possible to adapt this script or should I look for another one? There's so much scipts around and my knowledge is so slim that a simple advice would help me a lot here.

Share this post


Link to post
Share on other sites
Beerkan, is it possible to drop multiple groups?

I'm trying to drop 3 groups from a C130 but I can't figure out how the right format.

This is a nogo: _drop =["oparag1,oparag2,oparag3",c13,45] execVM "scripts\eject.sqf";

I have a version of the script that hoofs out ALL cargo units. In other words everybody in the aircraft, (excluding pilot and crew).

(Original post updated with new version and instructions)

With this version you only have to declare the vehicle. Open Parachute height is optional, as if you don't add it, they open it at 100m

Using your example,

_drop =["oparag1,oparag2,oparag3",c13,45] execVM "scripts\eject.sqf";

Becomes

_drop =[c13,45] execVM "scripts\eject.sqf";

New script (v2.5)

/* 
   Filename: Simple ParaDrop Script v0.7 Beta eject.sqf
   Author: Beerkan:
   Additional contributions cobra4v320

   Description:
    A simple paradrop script that ejects all units assigned as cargo onboard, including players and AI (excluding crew) regardless of group assignments, side etc.
    If you're in the aircraft you're getting thrown out.

   Parameter(s):
   0: VEHICLE  - vehicle that will be doing the paradrop (object)
   1: ALTITUDE - (optional) the altitude where the group will open their parachute (number)

  Example:
  _drop = [vehicle, altitude] execVM "eject.sqf"
*/  

if (!isServer && hasInterface) exitWith {};
private ["_vehicle","_chuteheight","_paras","_dir"];
_vehicle = _this select 0; 
_chuteheight = if ( count _this > 1 ) then { _this select 1 } else { 100 };
_paras = assignedcargo _vehicle;
_dir = direction _vehicle;

paraLandSafe = 
{
   private ["_unit"];
   _unit = _this select 0;
   (vehicle _unit) allowDamage false;
   waitUntil {isTouchingGround _unit || (position _unit select 2) < 1 };
_unit allowDamage false;
   _unit action ["EJECT", vehicle _unit];
   sleep 2;// Para Units sometimes get damaged on landing. Wait 0.5 to prevent this.
   _unit switchmove "adthppnemstpsraswrfldnon_1";
_unit setvelocity [0,0,0];
_unit allowDamage true;
};

{
_x disableCollisionWith _vehicle;
_x allowdamage false;
_x action ["GETOUT", _vehicle];
_x setDir (_dir + 90);
sleep 0.35;//So units are not too far spread out when they land.
[_x] allowGetIn false;// Still not working. AI group leader still call out to units to board _vehicle
} forEach _paras

{
   waitUntil {(position _x select 2) <= _chuteheight};
   if (vehicle _x != _x) exitWith {};
   _chute = createVehicle ["Steerable_Parachute_F", position _x, [], ((_dir)- 5 + (random 10)), 'FLY'];
   _chute setPos (getPos _x);
   _x assignAsDriver _chute;
   _x moveIndriver _chute;
   _x allowdamage true;
} forEach _paras;

sleep 2; // Allows Paratroopers to clear Helo, including C130.
{ 
 [_x] spawn paraLandSafe;
} forEach _paras;

---------- Post added at 04:09 PM ---------- Previous post was at 04:06 PM ----------

...By the way, I want to paradrop crewed vehicles (soviet style!), is it possible to adapt this script or should I look for another one? There's so much scipts around and my knowledge is so slim that a simple advice would help me a lot here.

Funny you ask.

Try this vehicle drop script.

Wanna see it....

Checkout this page epic-armour-drop

Edited by Beerkan

Share this post


Link to post
Share on other sites

Colour me happy! Thanks a lot Beerkan. :yay:

"Wanna see it..."

You bet!

Share this post


Link to post
Share on other sites

Thank you very much for informing us of the updated version, and for creating an archive :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Ok, I now offer the latest update to the Simple ParaDrop script, (still in beta) which needs testing before I post it as a full update.

In this latest version, finally both the paratroopers and the Paradrop vehicle are now vulnerable to damage at all times even during the ParaDrop. (And it really bugged that they both weren't!!)

Ok, except when the para units are 3m from ground, as units can still suffer damage when landing. (I hope to figure out a fix for this too). I still also need to sort out safely landing on a building roof and not dying, which

I'm looking into now.

In the meantime let me know how you get on with this latest beta version.

SEE Script in first post.

Setup Parameters are the same for first version

Edited by Beerkan
0.7 betaupdate

Share this post


Link to post
Share on other sites

If its a beta I would change the version to 0.6 once you release it v1.0

---------- Post added at 00:22 ---------- Previous post was at 00:10 ----------

Check your if statements.

Share this post


Link to post
Share on other sites

Cool stuff!! Thank you :)

Edit: Using this script with the C130J port, players get ejected but the parachute never spawns. Any ideas? Parachute classname unchanged.

Edited by rzon

Share this post


Link to post
Share on other sites

Is this MP compatible? If i use your script in MP my group ejected from chopper, but noone gets a parachute and hit ground very hard... in SP it works fine...

*UPDATE*

However... this changed part works for me:

{
   waitUntil {(position _x select 2) < _chuteheight};
_chute = "Steerable_Parachute_F" createVehicle [0,0,0];
_chute setDir ((_dir - 5) + (random 10));
       _chute setPos (getPos _x);
_x assignAsDriver _chute;
_x action ["GetInDriver", _chute];
} forEach _paras;

Edited by Buliwyf

Share this post


Link to post
Share on other sites

I´ve tried this script.

It´s working very fine in SP, but not in MP (on our Server).

Do you have any clue, why it´s not working?

My parachute-team will get kicked of the chopper, but no parachutes opens... (only in MP!).

I´m not good in scripting, so please take a look over it... :-)

Actual I´m playing under ArmA3-V1.22, maybe that´s the problem.

Another question:

Your script depends on a unit, starting in a flying chopper with a certain height.

What, if the MP-unit should be able to rerarm at some ammocrates before it gets into the chopper...?

Then I guess your script cannot work, because of the pre-defined parachute-opening-height.

The unit starts at ground-level (0m) and ascents with chopper to let´s say 150m,

but the script will set the unit into the parachute when it´s at at 100m (on the way ascending to 150m)

Do you have an idea, how to fix this?

Greetz Purzel

Share this post


Link to post
Share on other sites
I´ve tried this script.

It´s working very fine in SP, but not in MP (on our Server).

Do you have any clue, why it´s not working?

Try latest version from the main page.

Another question:

Your script depends on a unit, starting in a flying chopper with a certain height.

What, if the MP-unit should be able to rerarm at some ammocrates before it gets into the chopper...?

Then I guess your script cannot work, because of the pre-defined parachute-opening-height.

The unit starts at ground-level (0m) and ascents with chopper to let´s say 150m,

but the script will set the unit into the parachute when it´s at at 100m (on the way ascending to 150m)

Do you have an idea, how to fix this?

Greetz Purzel

This won't happen. Don't assign a parachute to your unit. Your don't need a parachute. The script will move you into a parachute one ONCE you've been ejected and are at 100m. not once you're at 100m in the vehicle. Edited by Beerkan

Share this post


Link to post
Share on other sites

Script updated. Fixes for MP and Compatibility with Arma 3 version 1.28. See example mission file from first post.

Any issues let me know.

Enjoy.

Share this post


Link to post
Share on other sites

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

I put script in mission folder,

add this to group init: "Paras = group this;{_x assignasCargo UH80;_x moveinCargo UH80} forEach units group this;"

Choppet name: UH80 and init: this flyInHeight 120;

and this to trigger: "_drop =[uH80,100] execVM "eject.sqf";"

When MP this don't open other people's parachute, just my and AI parachute's. Please little help.

Share this post


Link to post
Share on other sites

Locality problem in global area you use a local variable (_drop).

So use following:

my_drop =[uH80,100] execVM "eject.sqf";

Maybe...

And i would trigger the script server only...

*Update*

I used it in this way in MP:

nul=[[[uH80,300],'scripts\ejectParas.sqf'],'BIS_fnc_execVM',false] spawn BIS_fnc_MP

and in ejectParas.sqf:

if (!isServer) exitWith {};

Edited by Buliwyf

Share this post


Link to post
Share on other sites

found an issue, if your in a helicopters FFV spot, it wont kick you out :confused:

Share this post


Link to post
Share on other sites

Thank you for your suggestion!

What about the trigger? As I understand it limits script execution (makes it only possible in that trigger's area). Is there a way to call it via addaction in vehicle init?

Share this post


Link to post
Share on other sites

Works if you assign the group to already be in the heli. This isn't practical if the vehicle is setup to take off from the ground once the group has boarded. I prefer to just use Cobra's original script that looks like this:

 _grp = _this select 0;

{
	unassignVehicle _x; 
_x allowDamage false; 
moveOut _x; 
sleep 0.4; 
_chute = createVehicle ["NonSteerable_Parachute_F", position _x, [], 0, "NONE"];
_chute setPos (position _x);
_x moveinDriver _chute;
sleep 0.4;
} forEach (units _grp); 	

{
waitUntil {(position _x select 2) < 2};
_parachute = nearestObjects [_x, ["ParachuteBase"], 5];
_x action ["eject", vehicle _x];
{deleteVehicle _x} count _parachute;
_x switchMove "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon";
_x allowDamage true;
} forEach (units _grp);

Edited by RTEK

Share this post


Link to post
Share on other sites

So I tried everything as suggested above, still I am having the same issue with MP compatibility. AI open them but players do not.

@Buliwyf

This is supposed to go on the Trigger, Correct?
 

nul=[[[UH80,300],'scripts\ejectParas.sqf'],'BIS_fnc_execVM',false] spawn BIS_fnc_MP

And I renamed the script and added:

if (!isServer) exitWith {};

to the top of the script.

Still though I am having the exact same issue as before and nothing has changed.

Has anyone figured out how to fix this or found a different script that does the same thing?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×