Jump to content
Sign in to follow this  
xhdx

Heli/paradrop unit problem

Recommended Posts

Hi, I am in the midst of adding more detail to my MP mission, but I have a problem.

I will explain what I am trying to do with these units, and what code I have put into it, for it to work.

Units:

UH-80 - I named this "Helicopter"

Para Trooper - I named this "A"

Para Trooper - I named this "B"

Both Para Trooper's have "This moveincargo Helicopter", so that they start and move with the helicopter.

The Helicopter has a simple Move waypoint.

Between the helicopter and the Move waypoint, there are 2 Triggers. The two triggers, order the 2 units to eject from the heli using this code, where the letter A/B is the para troopers name and Helicopter is the name of the unit. So, I have to pieces of this code. 1 per Waypoint;

A action ["Eject",Helicopter]

The Problem

So, the main problem is, when the Heli spawns with the units inside, it immediately drops the units. After dropping the units, it doesn't even travel to the waypoint. Sometimes it hovers for around 1 minute, then goes to around 15m Alt, other times it drops immediately to various alts, but it doesn't move to the waypoint.

I have no clue as to why it does this. It worked when I first set it up, but broke after adding 2 more paratroopers to the same Helicopter. However, I deleted those para troopers and their respective triggers, along with the Heli, but the problem is still there.

Any advice would be welcome :) P.s I am new to all the editing and coding :)

Share this post


Link to post
Share on other sites

If you want to do the paradrop (with parachute), use my function or if you want to HALO jump, use cobra's script with example mission (http://forums.bistudio.com/showthread.php?167042-AI-HALO-Jump-Example-Mission):

fnc_LUKI_chuteFunc = {
     _chute = createVehicle ["Steerable_Parachute_F", getMarkerPos "land", [], 0, "FLY"];
     _chute setPosATL [getPosATL _chute select 0, getPosATL _chute select 1, 200];
     player moveInDriver _chute;
  };


call fnc_LUKI_chuteFunc;

All you need is to place a unit into the map where you want to jump, and then create an init.sqf script in your mission directory, press PLAY button and let's jump. :)

Share this post


Link to post
Share on other sites
LUKI;2854494']If you want to do the paradrop (with parachute)' date=' use my function or if you want to HALO jump, use cobra's script with example mission ([url']http://forums.bistudio.com/showthread.php?167042-AI-HALO-Jump-Example-Mission):[/url]

fnc_LUKI_chuteFunc = {
     _chute = createVehicle ["Steerable_Parachute_F", getMarkerPos "land", [], 0, "FLY"];
     _chute setPosATL [getPosATL _chute select 0, getPosATL _chute select 1, 200];
     player moveInDriver _chute;
  };


call fnc_LUKI_chuteFunc;

All you need is to place a unit into the map where you want to jump, and then create an init.sqf script in your mission directory, press PLAY button and let's jump. :)

I don't want my unit to fall from the sky, as I explained above. I want my unit to jump from inside another unit, like stated above. I don't know how to link the unit in the script, which I guess you would have realised from the first post.

I don't want to create extra files for simple things like this if they're not needed, unless you're telling me that the already built editor is so terrible, that it doesn't work properly?

Share this post


Link to post
Share on other sites

You have to unassign the vehicle first, then eject the unit. Otherwise the helicopter probably "waits" for the soldiers to get in again... which obviously won't ever happen.

unassignVehicle A;
A action ["Eject",Helicopter];

unassignVehicle B;
B action ["Eject",Helicopter];

...for example. This way the helicopter should continue with his waypoints.

But I noticed that the parachute stuff is very instable anyway. Every once in a while my soldiers "dropped" out of the parachute, also I sometimes had to set the vehicle and units to allowDamage = false, else they would die or damage the helicopter or damage the parachute itself... Later I ended up ejecting the soldier, then creating a parachute at his position and then use moveInDriver to get the soldier into the parachute. This gave me the best results.

PS: There is no reason to use two triggers. One should be enough. Try something like this:

handle = this spawn {
unassignVehicle A;
A action ["Eject",Helicopter];
sleep 1;
unassignVehicle B;
B action ["Eject",Helicopter];
};

(Didn't tested the code, wrote it out of my head)

Edited by Lexx

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  

×