Jump to content
Sign in to follow this  
norrin

Chopper/aerial taxi script

Recommended Posts

Description

This simple system of scripts allows you to jump on an AI piloted chopper and then command it to fly to a map point where it will land and you can disembark. The chopper will then return to base and refuel, where upon it can be commanded to extract you from another map click position selected by the player.

Not really sure where to post this as a version of this script originally appeared in the DB_NorrN fastrope addon thread.

Anyway some time ago I promised to make these scripts stand alone.

Download:

http://norrin.org/downloads/OA/HeliTaxi/NORRN_aerialTaxi061.utes.rar (The revised readme is in the mission folder)

License

These scripts are not to be used for commercial purposes or to be modified without the author's prior consent

Tested

Version 1.57 Combined Operations

Should be both MP (both dedicated and local server) and SP compatible

How it works:

i. When a player group leader gets in the chopper in a cargo position an action appears to set the chopper land destination (chopper will land at this point).

ii. Use the action and then a prompt appears to click on the map to set your destination.

iii. The chopper will commence taking off – during the journey to the destination the player commander will be given an action to cancel the destination – if a player chooses this option the chopper goes into a holding pattern and the player can choose a new destination or return to base.

iv. Once the destination is reached the chopper will land at the point designated and will remain there with the engines running until the "all clear" action is given. This will give you plenty of time (if needed) to unload the chopper get gear etc. Once the all clear is given the chopper will automatically return to base.

v. The chopper will then return to base and refuel. After a few seconds an action will appear for the player group leader to set an extraction point.

vi. If this option is chosen the player will need to click on the map to identify a safe location for an extraction site. The chopper will then proceed to this location. Note: this location has to be relatively flat and away from trees and powerlines etc otherwise the chopper will be damaged as it lands and you’ll end up being stuck there.

vii. Once the chopper lands it will remain there (with engine running) until the all clear is given.

viii. The chopper then lifts off and actions appear in the player group leader’s action list giving the player the option to return to base, set a new destination.

Check the readMe in the download for more info.

Should work with any of the choppers, although I haven't tested the CH47 yet.

To add to your mission: (Please check the readMe.txt file in the latest version as this has changed again)

1. Copy the "scripts" folder that contains the "heloGoto" sub-folder folder from the example mission into your mission folder. If you already have a "scripts" folder in your mission then just copy the "heloGoTo" subfolder in to it.

2. Create an AI crewed chopper in the editor and name it in the editor eg. slick1. Make sure its initial start position is somewhere relatively open - to reduce the possibility of accidental crashing.

3. In the init line of the chopper or in the init.sqf put

null = [slick1] execVM "scripts\heloGoTo\heloGoTo_init.sqf";

where:

slick1 is the name given to the chopper in the editor

4.If you want to have the ability to call for extraction from mission start (ie. without having used the chopper to get to some location) make sure in the init.sqf file you put some code like:

player setVariable ["NORRN_taxiHeli", slick1, true];

where:

player - is player or the name given to the playable unit in the editor

slick1 - is the name given to the chopper in the editor

NB: only one chopper can be defined as the extraction chopper in the init.sqf

5. The aerial taxis will respawn by default if they crash mid-mission - to switch the respawn functionality off in the init.sqf put

NORRN_aerialTaxiRespawnOff = true;

6. If starting in a taxi chopper the player leader by default gets the actions to set destination

Ideas for use

Using this system you can now use a chopper to taxi you around the map or for tactical resupply etc and for those of you who use the revive script but only with the option to revive at base then this system can be used for MedEVAC.

Changes

0.61

* Fixed missing option to set chopper destination at start-up

0.6

* Improved/fixed escort behaviour (escort will now disengage, return to base and land)

* Further code optimisations to whole script suite

* Added two new global variables:

NORRN_FR_keepOldCrew = true;

NORRN_FR_keepOldHeli = true;

Set these vars to true in the init.sqf if you do not want the downed chopper or chopper crew deleted when a new slick/escort respawns

* Camera code improved:

(1) Will now get the camera action regardless of whether you're in a vehicle or on foot.

(2) If you specify a unit in the code that calls the camera eg.

[s1]execVM "NORRN_cam\start_cam.sqf";

Only this unit will get the option to use the camera in game, otherwise all players get camera option

* The camera code has been improved/optimised

0.4

* Added the escort gunship option to the scripts

* Numerous fixes - replaced almost all waitUntil commands with while, further fixes to dedicated server compatibility and chopper respawning code

0.2

* Fixed implementation for OA 1.57 and betas

0.1 (1.07)

* Removed the fast-rope option - script now acts as a general aerial taxi script with any chopper

* Added PublicVariable eventhandlers to reduce the need for setVehicle inits, therefore, reducing network traffic and JIP load

Edited by norrin
New version 151111

Share this post


Link to post
Share on other sites

Sounds great, will give it some testing and get back to you. Thanks Norrin!

Share this post


Link to post
Share on other sites

How to enable calling the heli after a trigger kicks in? Also enemy vehicles are extremely unresponsive to the helicopter running the script. I was able to land it next to a shilka and it did not even care. Is this a bug or something intentional? Enemy infantry appears to react and attack the helicopter. But vehicles wont.

Edited by alleycat

Share this post


Link to post
Share on other sites

Very nice script, this will allow me to clean up a couple of missions where I have 3 or 4 extractions set up with preset waypoints. Not to mention I can extract anywhere now instead of moving to a pre determined LZ.

One question. How can I shorten the time the bird is on the LZ. If that LZ is Hot we die before we get airborne again.

When the bird lands on the LZ, you have to wait for 25 to 30 seconds, even longer before you get the hint "Board the Chopper". If you board before that it will not read right and bug out.

After you get the hint "Board the Chopper" message and get in bird, you get the hint "Give Chopper all clear for takeoff". Once you give the command to takeoff, you then have to wait another 30 seconds or so before chopper lifts off.

Once in the air, it takes a second or so then you get the hint to go back to base or set new destination. Times are not too bad here but still could be shorter for a hot lz

Those two 30 second waits are death on a hot LZ. Is there a way I can shorten those times? I see "sleep 5" and "sleep 0.1" ect in some files. What is the actual times for the "sleep"? can I just go in to each file and change any "sleep" greater than 0.5 and make them 0.5 or less?

Other than those two times I really like this script and will be using it regularly with your credits in tact, thank you for your time put in this.

:yay:

Share this post


Link to post
Share on other sites

First, thanks for this script, I love it.

Second, is there a way to make it so the group leader can call for an insertion at all times? The reason for this is to allow the group leader to be able to bring players that die/respawn back to the AO in MP of course. The extraction option doesn't work well for that purpose as the chopper when cleared for takeoff needs the group leader in the bird to select either RTB or new insertion point.

I guess the other option would be just to set everyone as their own group. The only thing with that is, when I tried it, the options to call for the chopper weren't always there...and I couldn't quite pinpoint the reason or the frequency for it.

any ideas? and thanks for your time on this script! my lame attempts at a taxi failed horribly.

Share this post


Link to post
Share on other sites

Wow norrin, thanks a ton! I was just looking if you've updated the fastrope scripts and decided to check this forum section. Thank god I did.

Thanks again for developing this more. It's fantastic!

Share this post


Link to post
Share on other sites

Great script mate, its perfect for the immersion factor.

Although I do have a problem that maybe you can help me with though.

I'm trying to add it to an evo mission to the sniper class, to give them extra mobility around the battlefield, so I copy the scripts folder into the evo mission folder and add the text from your init.sqf to the main evo init.sqf file.

Then in the editor add in an AI chopper, But when I review the mission in the editor the options are not in the scroll menu, for any of the playable classes even though the script availability shows up in the top right of the screen

Edited by Bigpickle

Share this post


Link to post
Share on other sites

The dogs bollocks mate !

Another excellent addition.

More responsibility for team leader, love it.

Beats having to pre define pick up / drop off ponts

Share this post


Link to post
Share on other sites

Where can i change the heli pad marker to invisible if possible, i couldnt find any option?

Share this post


Link to post
Share on other sites
Where can i change the heli pad marker to invisible if possible, i couldnt find any option?

Scripts\land_destination.sqf

This is ~line 20ish

// Create HeilH

_heliH = "HeliHEmpty" createVehicle (getMarkerPos _mrkr_ex);

Thanks for the script Norrin!

Share this post


Link to post
Share on other sites

Got it... Cheers Baron

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

*EDIT* Seems i havent got it! i was just trying this and i think thats for placing invisible markers on mouse click, calling extraction... or am i missing something as usual

Found it.. Helogoto_init.sqf - _heliBase = "HeliHEmpty" createVehicle getPos _heli;

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

Well the above option worked, but it somehow breaks the other scripts so the heli doesnt land anymore

Edited by Katipo66

Share this post


Link to post
Share on other sites

I have a problem with the script. The chopper initializes well, I'm able to set a destination via the map etc, but once the chopper is at the destination, the pilot jumps out and dies.

Suddenly the dead pilot spawns back into his seat (but remains dead). The chopper keeps hovering, and when I give it the clear to takeoff command it just keeps hovering.

I tried forcing a respawn of the chopper by shooting it down. I get a message saying that the chopper is respawning at base. So I decide to do some extraction, I click the map, and after a couple of seconds I get a message saying the chopper is down again.

Now the chopper is one an open area, nothing to complicated, and I'm asking the chopper to land in a flat area as well.

I first thought it might be related to the kind of chopper. I tried the Merlin chopper, and the UH60M, but with the same results.

What is forcing the pilot to jump out of the chopper? Because it seems that's what causing the failure.

Share this post


Link to post
Share on other sites

I think the jumping out is purposely done to get the heli to land, before the pilot did it when heli touched the ground, it was quick and barely noticeable, the latest patch seems to have effected this and most heli behavior in general from wat I can tell

Share this post


Link to post
Share on other sites

Ok. I tried a couple of things in the script but doesn't seem to do much. Such a pain to get a helicopter to land... Hopefully norrin fixes it :)

Share this post


Link to post
Share on other sites

Ok I managed to fix it. Pilot no longer has to disembark and stuff. The chopper lands nicely.

Basically I modified three files: Land_destination.sqf, RTB.sqf, Extraction_destination.sqf

Instead of a doMove towards the target heliH I create a waypoint with a TR UNLOAD or LOAD action. When the chopper arrives I do a doStop heli and heli land "LAND" action.

Anyway to make a long story short, just overwrite the above three files with the files from this rar file www.dikkeduif.be/arma2/heloGoTo_fix.rar

Share this post


Link to post
Share on other sites
Ok I managed to fix it. Pilot no longer has to disembark and stuff. The chopper lands nicely.

Anyway to make a long story short, just overwrite the above three files with the files from this rar file www.dikkeduif.be/arma2/heloGoTo_fix.rar

Many thanks for your PM and for posting the fix. Gave it a quick test with a single player and playable AI on a local server this morning before work and seems to work very nicely.

I'll hopefully run some more tests tonight on dedicated server with more than one player just to double check.

Also thanks for your offer to incorporate your changes into the script package, but I'll hold off on that until BIS gets the chopper behaviour problems sorted that they introduced with the last patch (1.55).

If it still works well then I'll update the whole script package but for the time being I heartily recommend dikkeduif's hotfix.

Thanks again mate,

norrin

Share this post


Link to post
Share on other sites

---------- Post added at 05:38 PM ---------- Previous post was at 05:36 PM ----------

[/color]

Ok I managed to fix it. Pilot no longer has to disembark and stuff. The chopper lands nicely.

Basically I modified three files: Land_destination.sqf, RTB.sqf, Extraction_destination.sqf

Instead of a doMove towards the target heliH I create a waypoint with a TR UNLOAD or LOAD action. When the chopper arrives I do a doStop heli and heli land "LAND" action.

Anyway to make a long story short, just overwrite the above three files with the files from this rar file www.dikkeduif.be/arma2/heloGoTo_fix.rar

.......where exactly are the files located that are to be overwritten, cannot seem to find them, can you advise? :confused: steve

Edited by stevey

Share this post


Link to post
Share on other sites

Stevey,

When you go to your folder of the mission you are editing, there should be another folder inside called scripts/heloGoTo. You will find the three files in that folder. Just overwrite them with the ones from the rar file.

Share this post


Link to post
Share on other sites

Very nice script.

However, I am trying to use it on a ranked Domination with no AI.

The problem is whenever I create a Blufor chopper in the editor it will switch to the AI version of Domination and I don't want that, does anyone have an idea on how to be able to use it without adding an AI chopper in the editor?

Thanks!

---------- Post added at 03:31 PM ---------- Previous post was at 03:12 PM ----------

Very nice script.

However, I am trying to use it on a ranked Domination with no AI.

The problem is whenever I create a Blufor chopper in the editor it will switch to the AI version of Domination and I don't want that, does anyone have an idea on how to be able to use it without adding an AI chopper in the editor?

Thanks!

Edit: nevermind figured that out it works fine now :)

Share this post


Link to post
Share on other sites

Also got this working today. Great!!

BUT... Why is the Heli-Flight model so good when the Standard one is so appalling. This would appear to show that the "lunge" flying, and "drop landing" the Helos do in ARMA is fixable.

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  

×