Jump to content
Sign in to follow this  
Splicer

HOw to get a chopper to land and turn engine off?

Recommended Posts

Hi everybody,

I'm trying to get a chopper (object name: Chopper) go from a waypoint at sea to fly to land on an invisible object, and all the chopper does is hover over the invisible object.

1. If I enter this at the last waypoint:

Chopper land "LAND";

The chopper lands at the closes point along the shore not trying to fly to the invisible object.

2. I've also tried at the last waypoint:

Chopper engineOn false;

And the chopper stays hovering over the invisible object.

3. And if I enter at the last waypoint:

Chopper setFuel 0;

Well... you guessed ... the chopper falls into the sea.

Does anybody know how to turn off and on the engine of a chopper?

Thanks much in advance. -Splicer.

Share this post


Link to post
Share on other sites

Put a waypoint nearby and use a script on completion.

_Heli = _this select 0;
_Hpad = _this select 1;

_Heli domove [getpos _Hpad select 0, getpos _Hpad select 1, 80];
while {(_Heli distance _Hpad) > 120} do
{
sleep5;
};
_Heli flyInHeight 10;
sleep 4;
_Heli domove [getpos _Hpad select 0, getpos _Hpad select 1, (getpos _Hpad select 2) + 9];
sleep 4;
_Heli flyInHeight 0;
sleep 1;
_Heli domove [getpos _Hpad select 0, getpos _Hpad select 1, getpos _Hpad select 2];
sleep 15;
_Heli setfuel 0;

null = [Heli, Hpad] execVM "script.sqf"

Share this post


Link to post
Share on other sites

Mikey,

Very clever approach! :notworthy:

I still don't know why the choppers behave (or misbehave one could say) or don't obey some commands (e.g., land, engineOn).

But I am pragmatic and stick to what works. So I'll be using your approach.

Thanks much Mikey! VERY APPRECIATED!

My best, Splicer.

Share this post


Link to post
Share on other sites

You shouldn't need a complex script like that.

How are you triggering "chopper land "LAND";" ? Maybe it's not triggering properly. What types of waypoints are you using?

I'm able to get choppers to land on invisible H's no problem using the land command.

Share this post


Link to post
Share on other sites

If you use a "get out" waypoint over the invisible H object . The chopper is supposed to land and the crew should disembark and switch the engine of.

You could try if it works. Unfortunately I'm not able to check before this evening so maybe you could try this approach in the mean time.

regards

Share this post


Link to post
Share on other sites

@ xPaveway and nettrucker:

Thanks for your ideas. Let me give you more info about what the end goal is.

The chopper's coordinates of origin are of an invisible object's (in this case invisible H).

The chopper goes to a waypoint at sea where "on Act" code is given to have a team ejected/dropped into the water. So far so good.

Once this is done the chopper does go back on its own to the invisible object it took off from (no additional code used).

And I noticed that once the chopper is back to where the invisible object is the chopper stays hovering.

It is here, and without the need to use additional waypoints, that I wanted to have the chopper land and turn the engine off. But any additional code entered at the drop-off waypoint resulted in the observations mentioned above.

What I also want to do - for missions I'm creating - is to use invisible objects @ airports, airstrips, or aircraft carriers where pilots on stand-by will receive an order (i.e., request air support), go and get into the chopper, take off to execute a task (e.g., attack, pick-up, etc.) and then go back home where the chopper is to land and turn off the engine where the pilots will leave the chopper and be on stand-by mode again.

Am I overthinking this?

Share this post


Link to post
Share on other sites

Make a move waypoint near the H and in the onAct field:

chopper land "LAND";

If that's the last move waypoint, the chopper should land on the H and shut down the engines. If there are other waypoints after that move one you'd need to have some conditions to stop the chopper from proceeding to the next waypoint.

As for the stand-by mode pilots, I've been working on getting this working perfectly. I've made serveral missions now and it seems to be working pretty well. It involves using get out waypoints and then subsequent get in waypoints.

The get in waypoints are synched to a trigger so the pilots will not enter the chopper and fly to you until you trigger it via radio.

Share this post


Link to post
Share on other sites

It works with land command like xPaveway said.

If not.

Do you have more waypoints to the chopper after the landing one?

If so and you are using condition to stop chopper from continuing before radio call or whatever.

Do not put condition in the same waypoint with land command.

Make another waypoint right next to the one with land command and put condition to that one.

How far away is the landing H from the coast?

If it is far.

Make that route with two waypoints instead of one.

Share this post


Link to post
Share on other sites

Put this on act field in last waypoint dostop helicopter;helicopter land "land"

If you don't put the dostop command the pilot wont shutdown engines.

Share this post


Link to post
Share on other sites

I see that the answer is to have a(nother) waypoint near the landing zone. I thought it could be done without having to use another waypoint, but it is what it is... especially if it works. :D

Thank you all so much for your help with this! :notworthy:

My best, Splicer.

Share this post


Link to post
Share on other sites
I see that the answer is to have a(nother) waypoint near the landing zone. I thought it could be done without having to use another waypoint, but it is what it is... especially if it works. :D

Thank you all so much for your help with this! :notworthy:

My best, Splicer.

God it's nice having you around these forums lately. You got some damn good questions and then solutions offered up here. And a lot of this stuff I wanted to know. Thanks to all.

Share this post


Link to post
Share on other sites

I appreciate the kind words, Manzilla.

I'm a noob as I just got the game right before Xmas, but I like it and I am into it so much that decided to look into coding to do things the engine doesn't do by default, yet you can do if you are willing to script.

I did a lot of reading before I had the guts to ask questions (some I thought would be so basic that I would get scolded by the gurus), yet I'm amazed to find that some of my questions were not that trivial.

So I will try not to waste people's time with mundane questions if I can find the answers by digging around the forums and the wiki.

And I am certainly happy to help whenever my humble opinion could be of use.

Again, thanks for the kind words. See you around Manzilla! :bounce3:

All the best, Splicer.

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  

×