Jump to content
Sign in to follow this  
Lightninguk

ejecting from a c130

Recommended Posts

need help i have got 2 squads in a C130 that will be played by humans.now i have got a waypoint set for a C130 plus squad to eject from the plane on a waypoint, now i have tryed to unload transport/ unload/ get out and they still stay in the plane. can you tell me how to eject at a a certain point.

Share this post


Link to post
Share on other sites

[NameGroup,NamePlane] exec "jump.sqs";

jump.sqs

?!(isServer) : exit
_grp = _this select 0
_flz = _this select 1
_jmp = units _grp

_i = 0
_j = count _jmp
~(random 3)

#start
unassignvehicle (_jmp select _i)
(_jmp select _i) action ["EJECT",_flz]
_i=_i+1
~.4
?_j>_i:goto "start"
exit;

Share this post


Link to post
Share on other sites

Or there's the sqf method, jump.sqf in mission folder

if (isServer) then {
_group =  _this select 0;
_vehicle = _this select 1;

sleep 2;

{
unassignvehicle _x;
_x action ["EJECT", _vehicle];
sleep 0.5
} foreach units _group;
};

call the script at the jump point with:

_xhandle=[squad1,C1] execVM  "jump.sqf"; _xhandle=[squad2,C2] execVM  "jump.sqf";

Share this post


Link to post
Share on other sites
[NameGroup,NamePlane] exec "jump.sqs";

jump.sqs

?!(isServer) : exit
_grp = _this select 0
_flz = _this select 1
_jmp = units _grp

_i = 0
_j = count _jmp
~(random 3)

#start
unassignvehicle (_jmp select _i)
(_jmp select _i) action ["EJECT",_flz]
_i=_i+1
~.4
?_j>_i:goto "start"
exit;

sorry very new to using sqs/sqf as i arma1 that how we didi it so can you please tellme how i would,make the jump sqs script work as putting it here does not help me much but thanks for your help so far

Share this post


Link to post
Share on other sites

I wouldn't want to knock sqs if that's what your use to but if your just learning about scripts you'd be better learning with sqf which has superseded sqs.

open the mission folder "blah" (where "blah" is the save name for your mission in the editor) found at,

C:\Documents and Settings\Padjur\My Documents\ArmA 2\MPMissions\blah.

make a new text document, copy and paste the code and save as jump.sqf.

put a trigger across the flight path with

_xhandle=[squad1,C1] execVM  "jump.sqf"; _xhandle=[squad2,C2] execVM  "jump.sqf";

in the on act. where squad1 is the name of your squad, c1 is the name of your plane.

Share this post


Link to post
Share on other sites

ok how would i name a squad as they are call s1 to s20 in the name as i am using the norrin Revive Script so i would use this in the squad leader init

squad2 = group this;this addWeapon "NVGoggles";this moveincargo helo1;
is that right

sorry about this but very new to the scripts side of missions

ok done that i now get jump.sqf not found do i need to active this some how

sorted it silly me put the jump sqf in the wrong version can i just say thanks to all of you for helping me out ,alli need to do is get the parachute to be able to steer so any ideai
and again thanks Edited by Lightninguk

Share this post


Link to post
Share on other sites

Sorry Lightning I have the same problem with the parachutes. In fact let me know if you have problems with the script, my AI soldiers randomly die on the drops. When they get about 2 feet off the ground they completely stop then basically do a getout animation, then fall over and die, or they are injured. Not sure if this is just bug since Im using all 3 of the first aid modules.

There are parachutes in the editor that are steerable but you would have to attach them to the player somehow. I know there are scripts for this. Cant wait to see what the ACE MOD 2 looks like hopefully steerable chutes. I might have this script and will check when I get home later.

You can also use the halo jump script which would add the steerable chute. Just do a search for it here in the forums.

@Padjur

Thanks for the sqf version I will have to change over.

Edited by cobra4v320

Share this post


Link to post
Share on other sites

@lightning glad you got it sorted, By the way (just for info) and apologies if you already know this, you can move the whole squad in by putting

 {_x moveInCargo c1} foreach units this;

into the squad leader's init line.

For HALO(steerable) put in a trigger across the flightpath

S1 action [ "eject", c1]; S1 setvelocity [0,0,0]; [s1] exec "ca\air2\halo\data\Scripts\HALO_getout.sqs";
S2 action [ "eject", c1]; S2 setvelocity [0,0,0]; [s3] exec "ca\air2\halo\data\Scripts\HALO_getout.sqs";

and so on for each unit

(make sure the flyinHeight is +500 as its High Altitude)

http://forums.bistudio.com/showthread.php?t=73401 for more on HALO

you can use attachto command to attach a unit to a chute, seen a thread somewhere can't think where now.

@ cobra4v320 Your welcome, all credits should go to Rommel, as it is his excellent jump script, I got it from this thread http://forums.bistudio.com/showthread.php?t=76545&highlight I have had no problems, such as you mention with it, works like clockwork every time, (though some troops may get injured or die by landing in a bunch of trees or something but that often happens in reality anyway :D )

Edited by Padjur

Share this post


Link to post
Share on other sites

I am having issues with AI not leaving the plane when I am team leader. If I choose another spot the ai team leader tells us to all disembark and we all leave. When it's just me as team leader i get booted out of the plane and have the parachute icon and the rest stay in it. I've also setup humvee drops and an ammo crate just fine.

JUMP.SQF

if (isServer) then {
_group =  _this select 0;
_vehicle = _this select 1;

sleep 2;

{
unassignvehicle _x;
_x action ["EJECT", _vehicle];
sleep 0.5
} foreach units _group;
};

In player ( squad leader) i put in the init:

squad1 = group this; {_x moveInCargo c130j} foreach units this;

and at the trigger Activation is BLUFOR, present Condition this On Act. is

_xhandle=[squad1,c130j] execVM  "jump.sqf";

I originally had the "player1 action ["EJECT", c130j];player2 action ["EJECT, c130j];"... in the trigger and at one time it worked with the AI and then I started adding enemy and waypoints and another squad and then I noticed that my ai wasnt leaving. I created a new map from scratch and now I can't get it to work anymore.

Edited by shanawa

Share this post


Link to post
Share on other sites

Try

 {_x moveInCargo c130j} foreach units squad1;

and set flyinheight at 250 and speed limited.

Share this post


Link to post
Share on other sites

Well that didn't work either. One thing I did try was to select them all and hit disembark. #2 says roger and that is all that happens. I try action eject and I get #2 roger, #2 ready, #3 ready, #4 awaiting orders, #5 ready, #6 waiting. They refuse to get out of that thing.

---------- Post added at 08:07 PM ---------- Previous post was at 07:49 PM ----------

well I think i need to start from scratch again. I was able to make this work on a utes map. I also made separate units instead of choosing a recon group.

Share this post


Link to post
Share on other sites

@shanawa

The script works fine, I just tested it, its something your not doing. Have you grouped the airplane to the trigger?

On a side note:

One of my guys dies everytime using any paradrop script Ive come across. They will hit the ground then stand 3 feet off the ground, make a getout action then die.

Share this post


Link to post
Share on other sites

@ cobra4v320 I have had this also when, in testing for shanawa problem I noticed that when I placed a squad in the editor and moved them into the plane using

 {_x moveInCargo c1} foreach units this;

I was getting the problems you mentioned; five or six deaths or more ( shanawa's problems also) . But when I moved them into the plane with

{_x moveInCargo c130j} foreach units squad1;

It solved Shanawa's problems and greatly reduced the deaths you mentioned, only about one or two, which seem to mainly occur on sloping ground and rarely on clean flat ground (something that needs to be considered in selecting a drop zone perhaps).

All of this lead me to think if it may be connected to placing them on the ground at the start (in the editor) and then moving them into the aircraft. I don't know if you do this or use scripts for creating the aircraft, squads and waypoints etc. It has always served my purpose to use scripts and have not noticed these problems before. Maybe they're there and I just haven't noticed them and I wouldn't be able to give a technical explanation for it, its just an observation but maybe a better result is gained overall by using a script rather than placing them in the editor. My suggested reason for this is that a script calls for each unit to be placed inside a given position in a given aircraft etc etc and the game engine reads the whole event better (just a thought, could be total rubbish of course). I would be interested to hear anybody's thoughts on the matter.

Share this post


Link to post
Share on other sites

Yes I got it to work on a brand new map. I couldn't figure out what the problem was but on a new map it works fine. I have a 9 member squad and have it setup to eject 2 hmmv_tow's and I always get at least 2 squad members that die on landing. I also tried it without the vehicle drops but they still die.

Speaking of which I couldn't find a cargo space number to put a vehicle inside the plane. Seems that cargo 24 is the last person seat. I saw that there is a way to drive a hmmv into the c130 using the attachto method but I didn't see a way to put in something like hmmv1 moveincargo [c130j,25]. Is there a way I can put a hmmv inside so that when your starting the mission and looking inside the cargo hold you can actually see at least 1 vehicle instead of an empty space?

Share this post


Link to post
Share on other sites

Another option that Im considering is just doing an allowdamage false command, sleep 60, then allowdamage true. Ive been using something like this in a mission that Im making and no one dies!!!!

Share this post


Link to post
Share on other sites
Yes I got it to work on a brand new map. I couldn't figure out what the problem was but on a new map it works fine. I have a 9 member squad and have it setup to eject 2 hmmv_tow's and I always get at least 2 squad members that die on landing. I also tried it without the vehicle drops but they still die.

Speaking of which I couldn't find a cargo space number to put a vehicle inside the plane. Seems that cargo 24 is the last person seat. I saw that there is a way to drive a hmmv into the c130 using the attachto method but I didn't see a way to put in something like hmmv1 moveincargo [c130j,25]. Is there a way I can put a hmmv inside so that when your starting the mission and looking inside the cargo hold you can actually see at least 1 vehicle instead of an empty space?

The only way to put a humvee in the cargo bay is to attach it with attachTo. Unfortunately, while this looks great when you're outside the C-130 looking in, when you're actually seated in the back of it, a different model is used (an interior model). So, when seated inside the cargo bay, you won't see the humvee. You also won't see the cargo ramp open even if it was when you got in; and if you stand at the rear of the C-130 while the ramp is open and look in, you'll notice all the seats you see while in the cargo bay are missing.

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  

×