Jump to content
Sign in to follow this  

Recommended Posts

Hmm I'll have a look at this later tomorrow. First off I'll make a C-130 in the editor and jump out with a regular soldier (me) in cargo and see if a chute opens automatically. If it does then you can run a loop script to just use the unassignvehicle command on each unit. Just be sure you don't execute it on the pilot though! :p

If no-one else had answered by tomorrow I'll make a quick demo for you.

Share this post


Link to post
Share on other sites

Ok here it is:

Parachuting demo mission with two scripts, one to load troops into the plane and one to eject them.

As said the first script loops through the units in the player's group and loads them into the Hercules. This happens so fast you don't see it. When you're ready activate radio channel alpha (I think it's press 0 twice then 1 can't remember tho!) and the next script will activate and cleanly unassign them from the vehicle then issue the "EJECT" action for each soldier so they open their chutes.

All works nice and clean ;)

**If you want some explanation how these scripts work just ask. You can open both of them in Notepad. To use this demo you'll need to extract the zipped folder and place the mission folder (the folder that contains the scripts and mission.sqm file) into your 'missions' folder in ArmA 2 and access the mission from the Editor mission name Jump Demo.

Edited by chris330
Forgot some stuff :o)

Share this post


Link to post
Share on other sites

thanks man ill give it atry

how do i put this script into other missions? i am a bit confused as to how to do that.

Edited by mikebravotwozero

Share this post


Link to post
Share on other sites

I'll check in later tonight and have a look. It's easy enough to do and once you've got it figured once - you've figured it for life ;)

Share this post


Link to post
Share on other sites

Ok the way it's written now is not simple enough for a beginner. I'll make a new version and post it up probably tomorrow for you with instructions.

Edited by chris330
Double Post

Share this post


Link to post
Share on other sites

This is how I do it:

1) Name your plane (yourPlane) in example - "C1"

2) Create a squad, and name leader in example - "squad1"

3) Load them onto the plane at start

{_x moveInCargo yourPlane} forEach units group this;

To Kick em out, the sqf is called "jump.sqf"

// script begins here

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;

};

// script ends here

4) Call the script from a waypoint with this:

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

Edited by [RIP] Luhgnut

Share this post


Link to post
Share on other sites

I just started trying to work with the editor, so please bare with me.

In the script to load the squad into the plane, what do you write in the "yourPlane" section? Do you just write "yourPlane"

EXAMPLE

{_x moveInCargo yourPlane} forEach unit group this;

or do you name the aircraft and use that? I'll use the Luhgnut naming scheme

EXAMPLE

{_x moveInCargo C1} forEach unit group this;

OR do I use the name of the unit type?

EXAMPLE

{_x moveInCargo C130J} forEach unit group this;

?? I've tried to make it work and I don't know what i'm doing wrong. Also, I get some kind of error when I hit "okay" after typing th script into the unit, but nothing comes up, just an okay box.

Thanks in advance.

-Heinz

Share this post


Link to post
Share on other sites

yourPlane, C1, C130J are references to the name of the plane on the map that you give the unit in the edit screen, without the correct (custom) name soldiers wont be moved.

also the correct syntax to put in the leaders init is:

{_x moveInCargo C1} forEach units group this;

Share this post


Link to post
Share on other sites

As said above.

Also, good practice:

(units group this)

Edited by Rommel

Share this post


Link to post
Share on other sites

Does this work? from "RS OFP Basic Editing Manual.doc"

PARADROPPING A GROUP

Lets say you have a group called PARAS.

this is how you would get them out of the chopper

cmd="EJECT"; "_x action [cmd,helo]" foreach units PARAS

Change HELO to the name of your helicopter and PARAS to the name of your group.

For everyone in the chopper just do this:

CMD="EJECT";"_x action[CMD,vech.name]" foreach (Unit (Group (Driver vech.name)))

Share this post


Link to post
Share on other sites

Perhaps check the FAQ, or read the previous posts. Its not hard.. and you could have saved us all some time.

Share this post


Link to post
Share on other sites

I put

{_x moveInCargo C1} forEach units group this;

In the leaders Int box and hit okay and an error pops up and says "Missing ;" but I have it written exactly as it's typed above... anyone have any ideas?

Share this post


Link to post
Share on other sites

Maybe try another name than C1.

{_x moveincargo NameOfPlane} foreach units group this;

Share this post


Link to post
Share on other sites

{_x moveInCargo C130J;} forEach unit group this;

the almight semi-colon may be the culprit.

Share this post


Link to post
Share on other sites
{_x moveInCargo C130J;} forEach unit group this;

the almight semi-colon may be the culprit.

Got it, it works now. Now the scripts to get them to "eject", where do I put that?

Share this post


Link to post
Share on other sites

I've done this myself, but I have an interesting problem in that the C130 no longer follows its own flightplan, but instead lands at the runway (I'm practicing refining the script in the central airport on the main map) but I suspect the C130 isn't being removed from the group 100% of the time (I didn't put it in any group, but that's how it's behaving).

I did the unassign vehicle for all the units in the paragroup too.

Anyone have any ideas, or might it be because I'm at the runway?

Edit: never mind, found out why - apparently I was calling the vehicle unassign in both the parajump function and then again seperately.

My guess is that it's a boolean (true/false) and by calling it twice, I was reassigning it to the C130 again, so it was landing to try to go to the squad's waypoint. I cleared it and didn't see the C130 again.

One other niggle though - I've got "things" that look like small strings of pearls or beads hanging in the air where the parachute emerged, I think - any ideas on how to get rid of them or will I just have to put up?

Edited by bfalcon

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  

×