Jump to content
Sign in to follow this  
lostninja

*Critical* Assitance with C-130j landing/unloading

Recommended Posts

hello. im just gona get straight to the point. ive had this game for a quite some time and iam very familier with scripting. but the one thing i CANNOT do sense the day ive goten this is making a AI C-130j land (which i know how to do), and unload its cargo (in mycase soldiers)

this,

AI C-130j Flys and lands at airport, stops and my soldiers automaticaly get out

now i know how to do helo unloads but with planes idk how

heres wut i currently have

-------------script--------------------

AI C-130j (plane1)

my Unit: (alpha) *this setGroupID["alpha"]

---------------------------------

AI C-130J lands at airport and taxis to from of control tower and stops

(Waypoint is set to "Get Out")

now at this point only the pilots get out, i have roamed around the forums and i did find numerous scripts but their all for jumping out of the plane in mid-air.

heres wut i have again

*Trigger is placed just b4 the "Get Out" waypoint saying:

-------------script--------------------

_xhandle=[GroupName,VehicleName] execVM "jump.sqf";

---------------------------------

plane1 is grouped TO the trigger and is set to "present"

my SQF file reads:

-------------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;

};

---------------------------------

this doesnt work. only the pilot gets out

ive also tried an SQS getup with a similar setup. it still doesnt work. only the pilot gets out. i have increassed the radius for the trigger and i still get nothing.

so if someone can assist me with this or make an example mission with the c-130j landing and kicking out its soldiers. I would greatly appreciate this. this is the one thing i have NOT been able to do sense i began using the editor and its stalling my mission from being completed.

Again, thanx for any support. if som1 can help me get this one thing done. i can finaly put this mission as complete

---------- Post added at 01:53 AM ---------- Previous post was at 01:19 AM ----------

Ok everyone. i took a look back and looked at all the forums carfuly and comparing to wut i have. and ofcourse i had the wrong script

this setGroupID ["alpha'] was not correct.

alpha = group this; {_x moveInCargo plane1} foreach units this; is the correct script

so if anyone every has problems with this as i did for a while the correct scripting is

On unit init: GroupName = group this; {_x moveInCargo VehicleName} foreach units this;

then

add a trigger over the area u want to get out (group the trigger to vehicle, set "present")

then on act:

------------script-------------------

_xhandle = [alpha,plane1] execvm "Eject.sqf";

------------------------------------------

your eject script should be as

-----------Eject.sqf-------------------

_group = _this select 0;

_vehicle = _this select 1;

if ( (typename _group != "GROUP") or (typename _vehicle != "OBJECT") ) exitwith {

hintSilent "Invalid Parameters parsed";

};

sleep 1;

{

unassignvehicle _x;

_x action ["EJECT", _vehicle];

sleep 0.5;

} foreach units _group;

------------------

this should work. so if anyone has this problem, this is the correct script.

can close this thread or whichever mods feel neccesary^.^

Share this post


Link to post
Share on other sites

Have a trigger where you want the C130 to stop to remove fuel (C130's name setfuel 0) as well or it will keep on trying to move off. Then have a condition at some point to refuel it when you want it to move off.(C130's name setfuel 1)

Also be aware that rabbits will throw all your hard work into disarray, little fluffy bastards.

I will upload a mission example for Takistan if you like, including a pest removal trigger for the rabbits. Uses BAF units but will work fine as long as you have the latest 1.54 patch.

This involves the 130 landing, unloading the passengers then loading new passengers who have been unloaded from incoming helicopter transports. Your original passengers then load into the CH-47 and it will fly off.

The Merlin is for yourself and your team to board before it departs.

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  

×