Jump to content
Sign in to follow this  
rullstolskalas

How do i make soldiers eject from a helicopter?

Recommended Posts

As topic title says, i was doing a mission in the editor and i was wondering how i could make soldiers eject from a helicopter that is in the air. Do i have to use a script or something?

All help appreciated.

Share this post


Link to post
Share on other sites

This is the one I always use in OFP, I dunno it still works in ArmA. There might be some problems with the multiple gunners.

Quote[/b] ]

_helo = _this select 0

_allcrew = crew _helo

? (count crew _helo)<=2 && !isnull driver _helo && !isnull driver _helo :goto "DONE"

_array = []

"if (_x != driver _helo && _x != gunner _helo) then {_array = _array + [_x]}" foreach _allcrew

_allcrew = _array

? count _allcrew == 0 : goto "done"

_c = 0

#eject

_man = (_allcrew select _c)

?!alive _man : goto "skip"

unassignvehicle _man

_man action ["EJECT",_helo]

~0.5

#skip

_c = _c + 1

? _c != count _allcrew : goto "eject"

#done

exit

Run it with [nameof the helo] exec "script.sqs"

All passengers in the helo will eject except the crew

Share this post


Link to post
Share on other sites

create a txt file inside the mission folder, rename it to "helojump.sqs" or something and copy and paste the code above in it.

next step depends on when/where/how you want to execute it:

i assume you've set up a trigger that you want to make the crew jump? then you need to give your helo a specific name; for this purpose lets say you named the helo "dropship" (without the quotes of course=.

now doubleclick the trigger you have set up and in the init field you type:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">dropship exec "helojump.sqs".

assuming the script above still works in arma (which it might not) it should have the desired effect smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]dropship exec "helojump.sqs"

[dropship] exec "helojump.sqs" wink_o.gif

Is there still no paradrop waypoint in ArmA?

Share this post


Link to post
Share on other sites

Blanco,

I was looking last night and no there is no Paradrop option for waypoints.

I get an error w/ that script as well.

Share this post


Link to post
Share on other sites

What's that error?

It seems ArmA scripting is different, not only for the new commands but also for the syntax, I hope I don't have te re-learn everything confused_o.gif

Share this post


Link to post
Share on other sites

I'm pretty sure that this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"if (_x != driver _helo && _x != gunner _helo) then {_array = _array + [_x]}" foreach _allcrew

Needs to be like this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{if (_x != driver _helo && _x != gunner _helo) then {_array = _array + [_x]}} foreach _allcrew

Edit: Tested and I was right you need to replace the "" with {} around the if statement.

I made an example located at OFPEC

here Its essentially the same script Blanco made with the correction to the "".

Hoz

Share this post


Link to post
Share on other sites

I messed around with this for a few hours over the weekend by locking the positions in the chopper so people could not bail out, upon landing the helo I tried "eject" like I would do in OFP but it's not working. I tried everything but I'm stumped.

- Ack

Share this post


Link to post
Share on other sites

Try the example mission I made, the eject works smile_o.gif

Share this post


Link to post
Share on other sites

So I've got a chopper on the ground, with a squad of 8 guys in it (grp1).

I have a radio trigger that does the following:

chopper domove getpos guy1; [chopper] exec "heloinsert.sqs"

heloinsert.sqs being the script hoz had in his example, and "guy1" being a squad leader for another squad located miles away from the chopper.

The heloinsert script works, but it seems to execute while the chopper is starting its engine and taking off from the ground instead of when it reaches "guy1".

How do I make the script execute when the chopper make it to the other squad's location?

Share this post


Link to post
Share on other sites

Work with two triggers. Havn`t tested any of "my" OFP scripts in ArmA until now, but it should work.

Share this post


Link to post
Share on other sites

ah yes

Hah, it didn't even occur to me to use 2 triggers, one to move the chopper and one to execute the script. It would be nice if I could do them both with one trigger, but that works.

thanks.

Now my next problem is after I hit the trigger that executes the eject script, I want the chopper to fly back to the landing pad and then land. I suppose I can do that with waypoints though, since the landing pad will always be in the same position.

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  

×