Jump to content
Sign in to follow this  
R34P3R

helicopter landing ??

Recommended Posts

Hi there.. i have another question...

i have added a MH60S on the Editor and one H with the name: start_target

so now i use the following script to get the MH60 to land:

blackhawk_1 setPos [(getPos blackhawk_1 select 0),(getPos blackhawk_1 select 1),100];
(group driver blackhawk_1) addWaypoint [position start_target, 0];
blackhawk_1 flyInHeight 90;

waituntil {sleep 0.3;((blackhawk_1 distance start_target) < 110)};
blackhawk_1 flyInHeight 30;
blackhawk_1 limitSpeed 25;
blackhawk_1 forceSpeed 25;
blackhawk_1 land "land";
waituntil {sleep 0.3;((blackhawk_1 distance start_target) < 90)};
blackhawk_1 flyInHeight 20;
blackhawk_1 limitSpeed 15;
blackhawk_1 forceSpeed 15;
blackhawk_1 land "land";
waituntil {sleep 0.3;((blackhawk_1 distance start_target) < 6)};
blackhawk_1 limitSpeed 1;
blackhawk_1 flyinheight 0;

this will work to 70% ! the other 30% the blackhawk slowdown over the Target but overfly them... and after this hes flying away.

I dont know why he dont whant to Land 100%..

Thanks for your help.

Share this post


Link to post
Share on other sites

I think the AI is not that great a going straight into a landing, they often fly past a bit or overshoot in a flare, come to a hover then fly sideways in to land. Have a read of some of the other Helicopter threads this is discussed, not sure there is a solution art the moment.

Share this post


Link to post
Share on other sites

What helped me as a workaround (or lets say, using some existing bugs):

- have the helicopter move to a specific location

- have him fly very low the last meters (flyinheigt maybe)

- the last waypoint (or the landing waypoint) should be of "disembark" (if that's what they name they WP in the englisch version)

With me the helicopter will land, but the crew will not get out until especially told. The copter simply lands. Thats the only way to make a helicopter ingame hold as well: tell the pilot to get out ;)

Share this post


Link to post
Share on other sites

i think i found a way....

Testet 20 times.. all 100%

waituntil {sleep 0.3;((blackhawk_1 distance pilot_target) < 300)};
blackhawk_1 flyInHeight 50;
blackhawk_1 limitSpeed 50;
blackhawk_1 forceSpeed 50;

waituntil {sleep 0.3;((blackhawk_1 distance pilot_target) < 200)};
blackhawk_1 flyInHeight 30;

While { (blackhawk_1 distance pilot_target) > 5 } do {
	blackhawk_1 limitSpeed 15;
	blackhawk_1 forceSpeed 15;
	blackhawk_1 land "getin";
	sleep 2;
};
blackhawk_1 land "getin";
blackhawk_1 limitSpeed 0;
blackhawk_1 forceSpeed 0;
blackhawk_1 flyInHeight 0;

Share this post


Link to post
Share on other sites

This works on chopper landing, but what about getting airborne again =)?

I tried to use this script to make a Mi-24 land, that part worked perfectly, the make it wait until players are inside, but chopper just turns engine on but won't takeoff =D.

Share this post


Link to post
Share on other sites

i know !! befor takeoff use this:

blackhawk_1 flyInHeight 100;
blackhawk_1 limitSpeed 200;
blackhawk_1 forceSpeed 200;

Share this post


Link to post
Share on other sites
i know !! befor takeoff use this:

blackhawk_1 flyInHeight 100;
blackhawk_1 limitSpeed 200;
blackhawk_1 forceSpeed 200;

Ok nice work, but just where are you putting this bit of script :confused:

Possibly in the init field of the next waypoint?

Share this post


Link to post
Share on other sites

You can use befor or after -doMove- or somethink like this.

Share this post


Link to post
Share on other sites

i put in on the waypoint after "LOAD" and the chopper took off nicely =)

Share this post


Link to post
Share on other sites

Hey,

would that work for me ?

I want a helicopter to take of by radio call.

he should fly to an empty H and pick me and my team up and then go to another waypoint.

Share this post


Link to post
Share on other sites

Here is a improved Script ! Worked mutch better then the distance check :

_bheight = getPos blackhawk_1 select 2;
While { _bheight > 8 } do {
	blackhawk_1 limitSpeed 15;
	blackhawk_1 forceSpeed 15;
	blackhawk_1 land "GETIN";
	_bheight = getPos blackhawk_1 select 2;
	sleep 1;
};

Share this post


Link to post
Share on other sites

Great, but how do you use it ?

Can you give me some example please ?

Share this post


Link to post
Share on other sites

If my choppers are starting out loaded up with troops and flying, and I want them to land and unload the troops, then take off in the opposite direction immediately, can I use "Transport_unload" where it says "GETIN"? and have it work?

I've got it working somewhat, but the choppers don't seem to want to go to the next waypoint that I have put into the editor. For background, I made a "transport unload" waypoint where I put the script into the "on act" line, then had another waypoint afterward that just has "move" on it.

EDIT: Below is my edited script....

waituntil {sleep 0.3;((blackhawk_1 distance lz_a) < 300)};

blackhawk_1 flyInHeight 40;

blackhawk_1 limitSpeed 100;

blackhawk_1 forceSpeed 100;

waituntil {sleep 0.3;((blackhawk_1 distance lz_a) < 200)};

blackhawk_1 flyInHeight 30;

While { (blackhawk_1 distance lz_a) > 5 } do {

blackhawk_1 limitSpeed 15;

blackhawk_1 forceSpeed 15;

blackhawk_1 land "transport_unload";

sleep 2;

};

blackhawk_1 land "transport_unload";

blackhawk_1 limitSpeed 0;

blackhawk_1 forceSpeed 0;

blackhawk_1 flyInHeight 0;

Edited by Durka-Durka

Share this post


Link to post
Share on other sites

Oh, I also have the choppers waypoint behaviour as "careless" and only half of them will land while under fire for some reason. Their lights are on too. Any way to fix this?

Share this post


Link to post
Share on other sites
Oh, I also have the choppers waypoint behaviour as "careless" and only half of them will land while under fire for some reason. Their lights are on too. Any way to fix this?

They will turn their lights off if their behavior is set to either "Combat" or "Stealth". As for only half-landing, are you sure they have room to land, and other choppers aren't landing in their spot?

Share this post


Link to post
Share on other sites
They will turn their lights off if their behavior is set to either "Combat" or "Stealth". As for only half-landing, are you sure they have room to land, and other choppers aren't landing in their spot?

Yeah, each chopper has their own invisible "H" pad and they tend to do fine under "careless." Any other mode, they fly circles around and do all sorts of crazy stuff. When in any mode, though, if they come even remotely under fire, they will just hang there for the duration of the mission doing nothing, but hovering, waiting to be blown out of the sky. It's like they can't complete their waypoint or something.

Share this post


Link to post
Share on other sites

Hey! I'm looking for a scirpt that makes a tirgger and an object working together.

Following situation: If I land to an (H) object, ex. a helipad sign, the mission is done! I think it's not so complicated, but i can't manage it.

THX :)!

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  

×