Jump to content
Sign in to follow this  
Victim9l3

Yet another parachute question

Recommended Posts

I found similar answers by searching but the ones I've come across have multiple factors and mine is only one.

I am putting units in the air, not in vehicles. Parachutes automatically open at 300. I want them to open a lot closer to the ground. That is for AI.

So how can I get them to open at a specified height and ignore the 300? Most searches required ejecting from a vehicle, I will have no vehicle.

Thanks

Share this post


Link to post
Share on other sites

Do not give the AI a parachute until the designated height.

para.sqf

_unit = _this select 0;

waitUntil {position _unit select 2 < 100};
_unit addBackpack "b_parachute";

Edited by cobra4v320

Share this post


Link to post
Share on other sites

Thanks that was fast. A question though cobra. I have about 50 units parachuting. I put your code in one units init and it didn't work. How would I make it for all 50 units. into a trigger or in each init?

Share this post


Link to post
Share on other sites

In your init.sqf:

For individual units:

{[_x] execVM "para.sqf"} forEach [unit1, unit2, etc...];

Or if they are in groups:

{[_x] execVM "para.sqf"} forEach (units groupOne);
{[_x] execVM "para.sqf"} forEach (units groupTwo);
etc...

Share this post


Link to post
Share on other sites

I'm still learning scritpting etc. so I don't mean to keep asking. But is this right?:

I create a "para.sqf" and put it in the mission folder

That .sqf will have the first code exactly as you typed it?

_unit = _this select 0;

waitUntil {position _unit select 2 < 100};

_unit addBackpack "b_parachute";

Then I put the second/third code in a trigger or whatever I need it in. ?

Is that correct?

Edited by Victim9l3

Share this post


Link to post
Share on other sites

What if I want the units to deploy steerable parachute at the altitude of 600 - 700 m (as in real life for HALO) or 5 - 10 seconds after exiting the aircraft (as for HAHO)?

Share this post


Link to post
Share on other sites

assuming you want the AI to open their shoots then place in the script (assuming AI already have shoots)

waitUntil ((getPos _unit select 2) > 700)
_unit action ["OpenParachute", _unit];

Share this post


Link to post
Share on other sites
assuming you want the AI to open their shoots then place in the script (assuming AI already have shoots)

waitUntil ((getPos _unit select 2) > 700)
_unit action ["OpenParachute", _unit];

That wont work if they are above 700 already. You also need brackets {}

waitUntil {position _unit select 2 < 700};
_unit action ["OpenParachute", _unit];

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
Sign in to follow this  

×