I really wanted to test this some more before I released it but..... I also have figured out how to streamline it some and hopefully make it more efficient...but limited time to work on it.......Hey it works as is.
This is an .sqf conversion of some scripts by Skumball for OFP.
it requires following items placed in the editor:
= A UH60MG Blackhawk
- A pilot named "heliPilot"
- A pilot named "heliGunner"
- An H named "hBase"
- An invisible H named "hMove"
- A marker named "blackhawk" and set to 'empty'
- A trigger with the following properties:
Activation: Radio Alpha, Repeatedly
Text: Blackhawk move
On Activation: OnMapSingleClick "this=[_pos] execVM ""heliMove.sqf"""; heliPilot sideChat "Where to?";
- A trigger with the following properties:
Activation: Radio Bravo, Repeatedly
Text: Blackhawk back to base
On Activation: this=[] execVM "heliBase.sqf";
there are three scripts, sorry I don't have anyplace to upload it or I would. Maybe this way I'll get some input on improvements.
init.sqftitleText ["Select radio (0,0,1) and click the map to move the Blackhawk to the location\nSelect radio (0,0,2) to send the Blackhawk back to base","plain"];
if !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
if (alive heliPilot) exitWith
{
1 setRadioMsg "Blackhawk Move";
2 setRadioMsg "null";
heliPilot setbehaviour "CARELESS";
helipilot setcombatmode "BLUE";
heliPilot assignAsDriver heli;
heliPilot moveInDriver heli;
heliGunner assignAsGunner heli;
heliGunner action ["GETINGUNNER", heli];
heliGunner setbehaviour "AWARE";
heliGunner setcombatmode "RED";
};
heliMove.sqfif !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
_pos = _this select 0;
sleep .005;
"blackhawk" setMarkertype "marker";
"blackhawk" setMarkerPos _pos;
2 setRadioMsg "Blackhawk RTB";
sleep 1;
heliPilot sideChat "Move order received and acknowledged";
heli setfuel 1;
hMove setPos [(_pos select 0),(_pos select 1),0];
heliPilot doMove _pos;
OnMapSingleClick "";
waitUntil {(getPos heli select 2) > 5};
heliPilot sideChat "Blackhawk is enroute to LZ";
if !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
waitUntil {(unitReady heliPilot) && (getPos heli select 2) > 10};
heliPilot sideChat "Blackhawk Landing at LZ";
heli land "get in";
if !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
waitUntil {(unitReady heliPilot) && (getPos heli select 2) < 1};
heliPilot sideChat "Blackhawk Ready for Orders";
"blackhawk" setMarkertype "empty";
if !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
if (unitReady heliPilot) exitWith
{
1 setRadioMsg "Blackhawk Move";
};
heliBase.sqfif !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
onMapSingleClick "";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
heliPilot sideChat "Blackhawk is Returning To Base";
heliPilot doMove (getPos hBase);
if !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
waitUntil {(unitReady heliPilot) && (getPos heli select 2) > 10};
heliPilot sideChat "Blackhawk is Landing at Base";
sleep .5;
heli land "land";
waitUntil {(unitReady heliPilot) && (getPos heli select 2) < 1.5};
heliPilot sideChat "Blackhawk is refueling at Base";
1 setRadioMsg "null";
heliPilot setdammage 0;
heliGunner setdammage 0;
heli setdammage 0;
sleep .5;
heliPilot sideChat "Blackhawk ready at Base";
if !(alive heliPilot) exitWith
{
onMapSingleClick "";
1 setRadioMsg "null";
2 setRadioMsg "null";
"blackhawk" setMarkerType "empty";
};
if (alive heliPilot) exitWith
{
1 setRadioMsg "Blackhawk Move";
};
It works for me and for tow others that have tried it.
NOT TESTED IN MP!