Jump to content
Sign in to follow this  
evans d [16aa]

Maka a Helo Land when Under Fire

Recommended Posts

Hiya guys,

First post so forgive me if I miss out on some sorta protocol;

Ok, I'm making a mission where the player and his squad are extracted after a while by a chopper (called "extractionHelo") because the number of enemy units are too numerous and he leaves a couple of AH-64Ds to sterilise the island. Now, I have a small dilemma that when I call for my chopper to come and extract me, instead of landing at the invisible heli pad I created (called "landExtraction") it just keeps flying around.

Unfortunetly, ArmA II doesn't let players fly or jump about 50 ft into the air so I can't get in... and then the chopper flies away leaving me and my squad to die.

I put some code in the penultimate waypoint before he gets to the pad:

extractionHelo land "extractionLand";

When ever I use this code in any other scenario is works, so I can only assume that it doesn't land because the OPFOR units are shooting at it.

Is there are way to make it ignore those units and just land? Some kinda script maybe?

Thanks, and I await your replies!

Bashkire

Share this post


Link to post
Share on other sites

Well, one of the easiest ways would be to set the unit's behaviour to 'Careless' in your waypoints. That'll make it completely ignore any incoming fire or enemy presence, and instead just go about what it's told to do.

Secondly, I'd recommend making the extraction chopper invincible. The reason I say that is because it really is a bugger if, say, a bullet whacks the pilot in the head and it comes plumetting down. Sure, it's realistic, but it also means that your mission sort of breaks. :P

If you wanted to do that, you could just put the following in the chopper's init line:

this allowDamage false;

Hope that helped!

P.S. How did the Laser Designated Artillery go? :D

EDIT:

Scratch that P.S.! :D Your PM was marked as read, but I'm sure I hadn't read it! Glad to hear everything went smoothly! It's good that I can be of some use around here! :) Good luck with all your future missions!

Edited by Fuzzy Bandit

Share this post


Link to post
Share on other sites

Thanks mate! I'll try that out.

The artillery is being used in this mission too, and yeah it worked brilliantly!

[shamless_plug]

For anyone who wants to take a look at the laser guided artillery script, please check this out: forums.bistudio.com/showthread.php?t=98398&highlight=calling+Artillery+Laser

[/shameless_plug]

Thanks! About to try that out now.

Share this post


Link to post
Share on other sites

The problem with setting the group to CARELESS is that the gunners won't defend the helicopter. There is a way round that... first you need to put the pilot in a different group to the gunners:

_HeliPilotG = CreateGroup WEST;
_HeliPilotMan = driver NameOfYourHeliVehicle;
_HeliCrewG = group _HeliPilotMan;
[_HeliPilotMan] join _HeliPilotG;

Then you can give the two groups separate orders. First the gunners get clearance to fire:

_HeliCrewG setCombatMode "red";
_HeliCrewG setBehaviour "combat";

Then you make the pilot ignore incoming fire:

_HeliPilotG setCombatMode "blue";
_HeliPilotG setBehaviour "careless";

Then you can order the pilot to go where you want and land where you want. The gunners will engage targets of opportunity and the pilot will fly on.

this allowDamage false;

Fuzzy_Bandit, I'd not found that previously... very handy, thanks!

Share this post


Link to post
Share on other sites

Ok, small problem, nothing much. To see if it was working I placed an OPFOR unit right next to the helipad and didn't call for cover as I extracted. The chopper landed... then it shut off it's engines... then it took off again and just hovered above the LZ too high for me to get into.

It's meant to stay on the ground (engines on, to simulate the urgentness of the situation). It stays there for 180 seconds (already got that set into the next waypoint).

Is there anyway to make sure it stays on the ground with the engines on? I expect these are rather amature questions, but... well... I guess I am one. :D

EDIT:

Wokstation, thanks for the help, I'll make 2 copies of the mission and try out this version.

Edited by Bashkire

Share this post


Link to post
Share on other sites
I put some code in the penultimate waypoint before he gets to the pad:

extractionHelo land "extractionLand";

Using that code on the penultimate waypoint will most probably force the helicoptor to land, and then take off again for the next waypoint. Try putting it into the last waypoint.

The last waypoint should be (depending on your exact mission design, of course, but usually this is the one) 'LOAD' for the helicoptor. This 'LOAD' waypoint (hopefully on or very near the invisible helipad) should be the one containing the land code.

Then, make sure that the ground troops have a 'GET IN' waypoint synchronised with the helicoptor's 'LOAD' waypoint. That way the helicoptor will wait for the troops before departing.

Edit

Just realised that you said the helicoptor will wait 180 seconds before departing, I assume purposefully with or without the friendly infantry. If this is the case, and you want him to sit with his engines on, you could try the code below in the landing waypoint. It may or may not work - not tested.

extractionHelo engineOn true;

The reason it might not work would be that the helicoptor might run that statement, keep it's engine on, and then continue to wait for 180 seconds and turn its engines off. Not sure how you would counter this without some sort of script.

I personally just use the method before this edit to ensure that all troops are aboard. Using that method means that as soon as all troops are aboard the helicoptor, it'll take off, as opposed to waiting around for 3 minutes! :P

Good luck and keep updating us on any bugs!

Share this post


Link to post
Share on other sites

Thanks mate, trying that now.

EDIT:

Ok, kinda worked... it's still got it's engines on and it's kinda still hovering. I'll fine a way, I hope....

Anywho, I'll have to look at this again tomorow, got a drama exam to go to and then cadets in the evening so I'll take a look at any other messages tomorow.

Thanks for the help/incomming help!

Bashkire.

Edited by Bashkire

Share this post


Link to post
Share on other sites

Good luck with your exam! :)

If I get some time I'll make a mock-up mission and see if I can get it to work. If I can, send me over your .pbo and I'll see if I can debug it.

Share this post


Link to post
Share on other sites

I've been paying about with choppers all week and they can be a pain.

I found that if you sync the waypoint after the land it will and won't work depending how close it is to the previous waypoint.

Put it very close to the waypoint that's ordering the chopper to land and it works. If you put it further away it doesn't, it bobs up into the air but won't go to the waypoint until the order is given.

As for keeping the engines running while landed it's quite easy.

In the waypoint and after the chopper land "land" command you need to call a little script.

call with

nul=[nameofvehicle] execvm "EngineOn.sqf"

// nul=[nameofvehicle] execvm "EngineOn.sqf";

_unit = _this select 0;
  waitUntil {!(isengineon _unit)};
_unit engineon true;

You could do the same thing with a trigger but I think this is better.

Not tested for MP.

If you put chopper engineon true in the waypoint it won't work as the engine is still on, the waypoint activates long before the chopper has landed.

.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

use

this disableAI "TARGET"; this disableAI "AUTOTARGET"

in the choppers init line, the gunners will defend the chopper, but the pilot will ignore the enemys

Share this post


Link to post
Share on other sites

Ok, got a little time;

Is the script already in the game or would I have to make it? If I have to make it, what would I have to put in it?

Thanks!

EDIT:

Jelliz, isn't that giving commands to the same unit twice? Sorry, bit new to all this.

EDIT:

Can't get the script command to work. Care to give me a big of a shove in the right direction? I mean, do I have to make the script or is it already in the game? Thanks

Edited by Bashkire

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  

×