Helicopter taxi system

Presentation
The mod includes a heli taxi system that you can enable or disable and configure to fit missions needs. All helis are created and handled by the server and slaved to the group of the player that required them. See options below for further explanation. Helis can come fetch you both on land and on sea, their course can be set by adding waypoints and changed at any time during the flight except when the heli has started its landing phase. Mission makers can define what type of helis can be called, what conditions must be fulfilled to call helis and how many simultaneous helis can be called by a side.

Calling the heli
If you fulfill the conditions necessary to call the helicopter you will receive an ACE3 self interaction that allows you to call for air transport.

Upon selecting the action you will first get prompted by a menu to choose what type of helicopter you want to call. Types of available helicopters are side dependent and defined by mission makers. After choosing the type of helicopter your map will force open. And you can set a LZ by SINGLE clicking on the map where you want the heli to land. Please note: you cannot close your map until a LZ has been set, and the map will be visible even if you do not have a map item in your inventory. The LZ might not be exactly where you clicked since the function tries to find a flat area without nearby buildings. As a rule of thumb you should not try to call the heli on inappropriate terrain, AI pilots will still try to land an chaos will follow... You can however select a LZ over sea (try to avoid requesting bigger helis in that case). Once a heli has been called you will not be able to call another one for the duration of the heli presence. You, or any member of your group can cancel the call at any time as long as no one has boarded the heli (ace self interaction).

The helicopter will take some time to come to the LZ and can be destroyed. When it is almost over the LZ a green smoke will pop to indicate where it will land.

Heli availability rules
Helis are slaved to groups, any given group can only call a heli once at a time so as long as a heli is in operation for your group you will not be able to call a new one. If your heli is destroyed or cancelled calling a new one will be available again. How many helicopters can be called by a side simultaneously is dependent on mission settings so helis might not be available if one or several other groups are already using one.

Setting and changing course
Anyone on board can set the course for the helicopter (but if someone is already using the interface it will not be available to other players on board). You can set a course by using ace3 self interactions. An interface will show up. You can select the final LZ by double clicking on the map. You can set up intermediate waypoints by double clicking on the map while holding down CTRL. The helicopter will follow the waypoints in the order you have set them. Course can be changed in this manner at any time during the flight except when the pilot has started the landing phase.

Boarding the heli at sea
Helis can be called over sea to pick up combat divers for example. Many helicopters will hover too high over the sea to be accessed by vanilla interaction but they will receive an ACE3 interaction that allows players to get on board from further away.

Security force land
In some rare cases the pilot will start the landing phase, but the helicopter won't land for some reason. As a security, after 30 seconds into the landing phase players will receive an ace 3 interaction that allows them to force the landing. Use only if the heli doesn't seem to be willing to land by itself.

Settings location:
Settings are handled by CBA and can be found under settings>configure addons>show MRH_Milsim Tools - Heli Taxi

Disabling
You can disable/enable the heli taxi system at any time during a mission, or when editing the mission visit CBA website for more information.

Number of simultaneous available helicopters per side
This setting defines how many simultaneous helicopters a side can call. Minimum is 1. If set to one for example a BLUFOR group won't be able to call a helicopter while another BLUFOR group is using one.

Conditions
By default the condition to be able to call a heli is to be leader of the group (isFormationLeader = true). If you uncheck the box, everyone will be able to call it.

Setting a custom condition
If you check the custom condition condition code the code you type below will be applied as a condition to be able to call a helicopter (this won't however affect helicopter availability rules) as an example a default code condition is set that checks that the player is formation leader and has ACRE2's an/prc 117F radio. You can change this to anything you like (code that must return true or false). Use single quotes  ' instead of double quotes " and DO NOT use semicolon ; at the end of your code. This obviously requires some basic coding knowledge, if you are not sure what you are doing there do not hesitate to ask for help. This is the best place to do so.

Defining available helicopters by side
Mission makers can replace vanilla helicopters by helicopters of their choice. A minimum of one helicopter is required. By default some vanilla helicopters are set. Enter classnames, without quotes and separated by comas. For blufor and opfor I have also added some VTOLs to the list, because it's really fun to use them, but DO NOT use VTOLs with LZs that are over sea.

Caveats:

 * Helicopters need to touch ground to drop the players on land, some helicopters such as RHS USAF's Super Stallion never do and hover above ground. I have created an exception list for such helicopters and they will land completely, for the moment it only contains both version of the Super Stallion, if you notice another helicopter that behaves like this, please let me now. In the meantime the super stallion is a great tool for sea insertions!
 * Having helicopters hover over sea was a bit tricky, it works very well with some helicopters but some other will sink (the bigger ones mostly) if you are planning for operations with combat divers I suggest you really test the helicopter you want to use. The "climb onboard" ace action when the LZ is over sea is only added to the "Helicopter" base class and so won't be added to VTOLs.
 * When a taxi helicopter is destroyed an event handler is fired that allows a new helicopter to be called by the group. The event handler doesn't fire if you delete the helicopter so if you wan't to destroy it as a zeus player you should not delete the heli (by pressing "delete" while its selected), but destroy it (by pressing "end") and THEN delete it.