Jump to content
Sign in to follow this  
God of Monkeys

[Release] Resupply Helicopter Script (Gungriffon Style)

Recommended Posts




Call helicopter come to help you, he will help you rearm, refuel and repair. This script is referenced from Gungriffon (1996, Sega Saturn) Video Game, you can use this script with chkw30k's "HMCS Addon", will have a lot of fun! Hope you enjoy :)


How to use:

1.Copy "ResupplyHelicopter" foldor into your mission.
2.Add"resupplyHeliRDY = true; publicVariable "resupplyHeliRDY";" into your init.sqf.
3.Copy "this addAction ["<t color='#00FFFF'>Call Resupply Helicopter</t>", "ResupplyHelicopter\resupplyClickonmap.sqf", "B_Heli_Transport_03_F"];" into your player unit's init.




Forum Topic:
HMCS Addon Workshop

Direct Download link

Steam Workshop


Resupply Helicopter Script (Gungriffon Style)

  • Like 2

Share this post

Link to post
Share on other sites

@God of Monkeys
in MP the helicopter sometimes gets stuck not moving.   Made a few edits to make it more reliable in resupplyHeli.sqf:


        // Spawn Heli, set fly height in case of mountains, delays and checks for stalling
        _unghi = [_spawnPosition,_resupplyPoint] call BIS_fnc_dirTo;
        _helicopterSpawn = [_spawnPosition, _unghi, _heliClassname, west] call BIS_fnc_spawnVehicle;
        _helicopter = _helicopterSpawn select 0;
        {_x setskill ["courage",1]; _x allowFleeing 0;} forEach (crew _helicopter)+[_helicopter];
        _helicopter flyinheight 150;
        _heliPad = "Land_HelipadEmpty_F" createVehicle _resupplyPoint;
        _helipadPosition = getPos _heliPad;

        // Add Resupply Area to Heli
        [[_resupplyPoint],"ResupplyHelicopter\resupplyCreateTrigger.sqf"] remoteExec ["execVM"];

        // Add delay to make sure heli is ready before continuing
        "Calling resupply helicopter" remoteExec ["hint"];
        sleep 2;

        // Move Heli
        _helicopter doMove _helipadPosition;
        "Resupply Helicopter inbound!" remoteExec ["hint"];

        waitUntil { _lastpos = getPos _helicopter; sleep 5; if (!alive _helicopter || !canMove _helicopter) then {deleteVehicle _heliPad; breakTo "heliDestory"}; _travelled = _helicopter distance2D _lastpos; if (_travelled < 1) then { [driver _helicopter, format ["%1 meters per second",_travelled]] remoteExec ["globalChat"]; doStop _helicopter; [_helicopter, _helipadPosition] remoteExec ["doMove",_helicopter]; sleep 10; } else {[driver _helicopter, format ["%1 meters to LZ",_helicopter distance2D _helipad]] remoteExec ["sideChat"]};  (_helicopter distance _heliPad) < 180};

        // landing routine, make sure it's local
        [_helicopter] remoteExec ["doStop", _helicopter];
        [_helicopter, _landingMode] remoteExec ["land", _helicopter];
        "Resupply Helicopter landing!" remoteExec ["hint"];

  • Like 1

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