View Full Version : How do i make soldiers eject from a helicopter?
rullstolskalas
Dec 3 2006, 12:42
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.
Lonewolf1980
Dec 3 2006, 13:20
do u mean manually ?, press 0-6 to bring up the action commands then tell them to eject..otherwise i think it'll have to be a script,there's one at http://ofpec.com
rullstolskalas
Dec 3 2006, 13:42
Yeah, i mean how do i make soldiers eject with the mission editor? I can't find any script on ofpec.com
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
rullstolskalas
Dec 3 2006, 17:30
i dont understand =/ i never worked with scripts before what do i have to do?
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"[/QUOTE].
assuming the script above still works in arma (which it might not) it should have the desired effect http://forums.bistudio.com/oldsmileys/smile_o.gif
Quote[/b] ]dropship exec "helojump.sqs"
[dropship] exec "helojump.sqs" http://forums.bistudio.com/oldsmileys/wink_o.gif
Is there still no paradrop waypoint in ArmA?
Blanco,
I was looking last night and no there is no Paradrop option for waypoints.
I get an error w/ that script as well.
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 http://forums.bistudio.com/oldsmileys/confused_o.gif
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[/QUOTE]
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[/QUOTE]
Edit: Tested and I was right you need to replace the "" with {} around the if statement.
I made an example located at OFPEC
here (http://www.ofpec.com/OFPResources/arma_resources/HeloInsertExample.Intro.rar) Its essentially the same script Blanco made with the correction to the "".
Hoz
Hit_Sqd_Ack
Dec 4 2006, 14:37
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
Try the example mission I made, the eject works http://forums.bistudio.com/oldsmileys/smile_o.gif
jack_oneill
Dec 5 2006, 01:35
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?
Work with two triggers. Havn`t tested any of "my" OFP scripts in ArmA until now, but it should work.
jack_oneill
Dec 5 2006, 02:03
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.