Author: Gunter Severloh
Author Website: https://warmod.webs.com/

Requirements: No addons required

Version: 1.7

Short description: Call a AI helicopter to come pick you up, and drop you off anywhere through map click, or return to base, core feature of the script enables you to signal the chopper via smoke during day, and flare at night once heli is within range.

Date: 2019-04-17 14:16


Comments: (2)
Rating:



 







Hermes Airlift Services Script

by
Rydygier & Gunter Severloh


Description:
Hermes Airlift Services is an easy to set up yet versatile and customizable script that enables heli airlift in a scenario.
The mission creator defines the "base" game logic, heli(s) to serve as an aerial taxi for units to be transported on demand.
HAS also provides an accompanying background chat for communications specific to typical situations, that could break procedure.
The script is written mostly for singleplayer, so multiplayer compatibility is not guaranteed.

Features:
  • Airlifting for units to a chosen destination or back to base.
  • Task initialized by radio call or by entering a helicopter at base.
  • Map click to choose a destination.
  • Helicopter will wait until all units are aboard and give the action to go to a new destination or RTB.
  • Variety of customization options through the userconfig.
  • Ability to cancel pending airlift.
  • The ability to point to an alternative LZ if landing is not possible at the chosen coordinates.
  • Daylight smoke, and night signals (flares) to mark the chosen extraction LZ.
  • Text radio chat communications or audio & text from the vanilla airlift support module.
  • Customizable call limits - set to -1 and have unlimited calls, set it to 4 and have only 4 call heli missions.
  • Possibility of adding new units and helis on the fly.
  • Logic handles special situations (not enough cargo space, heli destroyed/unable to fly etc.).
  • Optional auto embark*/disembark, *except for player controlled units and player lead groups.
  • On teamswitch all playable units defined in the userconfig will get the "call helicopter" action provided one being switched to is the player.
  • Fastroping.
  • Supply drop (slingload or paradrop)
  • destination choice action now appears, when heli is landed at pick up pos (no waiting for all to board, radio call) or when at least one of appointed units boards any appointed heli (first one boarded will be used).
  • Four new action to change flight ceiling on-the-fly.
  • rearranged the code (subfolder, all user config in the separate file for better clarity).
  • Module version - (configurable module in eden editor)
  • Added virtual arsenal option to supply drop


Installation / Usage:
For usage instructions and information of how to use the Hermes Airlift Services Script please refer to the included documentation and/or example mission.

    Paste HAS_fnc.sqf into mission folder
    Paste demo's init.sqf content into mission's init.sqf
init.sqf
if (isServer) then 
	{
	call compile preprocessFile "HAS\userConfig.sqf";
	call compile preprocessFile "HAS\HAS_fnc.sqf";
	[] call RYD_HAS_Init;
	};

Adjust init variables located on the top of HAS_fnc.sqf
Into RYD_HAS_STT array put names of all units, that will be using airlift. Optimally if all of them form a single group. At least one of them has to be player-controlled.
In the editor, place at chosen point Game Logic named RYD_HAS_Base
In the editor, place at least one helicopter to be used for airlifting (cargo space must be big enough for all transported units). Put names of all helicopters into RYD_HAS_allChoppers in the HAS_fnc.sqf
Alternative way for one vehicle: name single helicopter as RYD_HAS_Chopper

How it works
Once the mission initiates, all units named in the HAS_fnc.sqf RYD_HAS_STT array will get the
"Call helicopter" added to their action menu giving them the ability to call an airlift.

It is visible only to the player-controlled character (making a call require player action). The action represents a radio call for airlift.

When used, if all is OK, the number of calls left will be decreased by 1 and after a short background
radio chat, the closest heli able to perform the task will start and fly towards the caller's position.
When approaching, the pilot will search for presence of any proper signal putting the
extraction LZ around caller's position (of any origin, not only placed by the player!).

The signal is typically a smoke grenade or flare. If there was no signal given before the
helicopter arrives, the pilot will request a signal based on if its day or night and start to
loiter over the area for set amount of time waiting for signal to be given.
If the signal is not given in that time, the heli will RTB.

If the signal is seen then the pilot will scan the area for a safe LZ spot.

If not found, the player will be informed and asked to point to an alternate extraction
coordinate via map click.
This will be repeated until a suitable spot is found. When the LZ is found, the heli will
land allowing units to embark. At this point the caller may cancel the airlift via another mouse action.
When all units are aboard, the caller will get two actions: transport to another location
(pointed via map click) or RTB.

After the destination is chosen, the heli will fly there, land allowing disembark,
wait until all units are out, then RTB.
After the heli lands back at base a new call can be made.
If units are closer than 100 meters to the closest of appointed helis, radio call is not available.

In this case, or if player chooses, the airlift may be initialized simply by all units embarking in the appointed helicopter.
Once inside the actions for choosing a destination will become available,
returning back to base will not.

The task will immediately end if:
    There's no more appointed helicopters alive for airlifting units.
    Chosen heli is destroyed or deleted.
    Pilot of the chosen heli is killed or deleted.
    Chosen heli is unable to fly due to damage or lack of fuel.
    Airlift is cancelled by the player.


Media:


Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


License / Disclaimer:
Do not change/edit, reupload without permission.


Changelog:
1.7
- code reviewed and improved in regard of updating 0-8 helicopter lists and adding new helicopters and units mid game (details in the manual, p. 11, "Additional advanced settings");
- added systemChat message at init displaying in SP/on server running HAS version.

1.6
- Added ability to customize flight path via shift+LMB and alt+LMB at chosen moments;
- added user config variable RYD_HAS_CruisingSpeed;
- added adaptative targeting for not guided weaponry during CAS to improve fire accuracy;
- fixed code error visible on screen at entering transport helicopter along with all further issues caused by this one;
- various fixes around CAS and other. 

1.5
- CAS support with custom attack behavior, used may be appointed for HAS helicopters that are armed with any missiles or rockets;
- units from FFV positions should be fast roped properly on dedi;
- units with "canCall" false will no longer trigger transport task by entering the heli (such unit entering heli will be ignored);
- AI units after fast roping will now take some random positions few meters around to avoid next unit landing on previous unit's head etc.;
- also on dedi AIs should now after several seconds properly follow player TL's lead again;
- improved fast roping looks in sinfgleplayer (fast roped units should now go down rather along the ropes, than vertically to the main heli axis). 

1.4
Defining units, helis and prepared boxes (if any) in the script version by default similar way, as in module: via syncing them with RYD_HAS_Base Game Logic (old way still possible too if proper variables defined by the user);
If set on server: unit1 setVariable ["RYD_HAS_canCall",false]; unit1 losts access to HAS calls. Use: unit1 setVariable ["RYD_HAS_canCall",true]; To give actions back. Can be switched back and forth any time;
From now on custom rope attachment points defined per each heli separately (helis have to be named in EDEN for that, see the manual or userConfig.sqf for details);
At destination choice two variants for choosing target location: touchdown, for traditional landing, and fast rope. Fast rope switch in userConfig removed;
Added RYD_HAS_SafetyMargin = 10; user config variable. Value set here is added to the heli size when calculated radius for flat and empty area search at landing zone (where fast rope or RTB not used). 10 is reasonable minimum. The higher - the safer LZ as for collisions with map objects. The lesser - bigger collision risk, but also bigger landing accuracy (closer to the spot chosen by user). If 0 - only heli diagonal model radius will be used as search radius. If set with negative number like -100, final search radius is 0, thus collision checks ignored, but landing most accurate;
Fixed a bug with no destination choice actions appearing, if task was triggered by the unit entering the chopper at base, while player unit wasn't the first in the array (with current, syncing method order in the array AFAIK is same, as order of unit placement in EDEN - first placed unit will be the first etc.);
Caller can now redirect the chopper during the transport if initially was't chosen "RTB" option via re-using destination choice actions;
Minor code improvements;
Manual updated accordingly.

1.3
Improved MP compatibility (client side players/dedicated server)
Optional usage of 0-8 supports menu instead of most of mouse actions, except for destination choice actions
0-8 variant includes manual choice of the heli to use for the call (always, via submenu);
Task prioritization for the helis in the mouse actions variant. Two variables: "RYD_HAS_TransportPriority" and "RYD_HAS_SupplyPriority". To determine, which heli should be used for given task in the first place, regardless of the distance, and also which heli shouldn't be used for given task at all. The higher value, the higher priority of usage, negative value excluded from the task completely. Application for example via heli's init field: this setVariable ["RYD_HAS_TransportPriority",1];//the heli gets priority 1 for troops transport (will be used before any heli of 0 priority)
Predefined boxes to be delivered before spawned boxes. Script version - boxes/objects added into: RYD_HAS_SupplyDrop_Prepared = [box1,box2];//holds optional prepared boxes as supply to be dropped, that will be used before default, spawned boxes. Module version - same method or synced with module objects of "ReammoBox_F" kind or any synced with module object tagged for example via init field: this setVariable ["RYD_HAS_ThisIsBox",true];
Alternative landing (experimental, will enforce autodisembark at destination, if not RTB or fast roping, faster descent). Variable: RYD_HAS_AlternativeLanding = true;//scripted solution instead of vanilla getin/getout landings at pickup and disembark spots;
Respawn compatibility (player should get back HAS actions after respawn)
RYD_HAS_IgnoreAbilityCheck = true;//if true, in mouse actions variant there will be no check, if heli is able to lift given container before accepting the task.
Workaround for not unreliable slingload unhook issue on dedi
Several code fixes.
New Video added to the OP ---> https://www.youtube.com/watch?v=VlUE1hWYBbs&t=1s
New PDF Manual created and added to the OP ----> https://www.dropbox.com/s/txetwb5t6xug5ud/HAS_Manual.pdf?dl=0

1.2
- Added Module version - (configurable module in eden editor)
- Added virtual arsenal option to supply drop

1.1
added - fast roping
added - Supply Drop (slingload or paradrop)
added - action to change heli flight ceiling on-the-fly
changed - destination choice action now appears, when heli is landed at pick up pos (no waiting for all to board)
files - rearranged the code (subfolder, all user config in the separate file)

1.0


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!