Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!isServer) exitWith {};
- _random = selectrandom [1,2,3,4,5,6,7];
- if (_random>7) then {hint "Roll H failed!";}
- else
- {
- private _pos_Spawn = getMarkerPos selectrandom ["QRF_H1_S","QRF_H2_S","QRF_H3_S"];
- //sleep 1800; // 30-minute countdown
- hint "QRF H";
- // Create invisible helipad for helicopter to land on and as point-of-reference for waypoint creation
- private _H_LZ = "Land_HelipadEmpty_F" createVehicle [0,0,0];
- // Get random position 200-300m away in random direction from randomly selected player - depends on alias_hunt.sqf
- private _pos_H_LZ = [hunt_alias, 200, 300, 10, 0, 10, 0] call BIS_fnc_findSafePos;
- //pos_H1_LZ = [hunt_alias,200+random 100, random 360] call BIS_fnc_relPos;
- _H_LZ setpos _pos_H_LZ;
- // Create Helicopter 1 at Spawn Marker
- private _H_AR = [_pos_Spawn, 0, "rhs_mi8mt_vdv", EAST] call bis_fnc_spawnVehicle;
- private _H = _H_AR select 0;
- _H engineOn false;
- private _H_G = _H_AR select 2;
- // Orient helicopter to LZ
- private _H_DIR = _H getDir _H_LZ;
- _H setDir _H_DIR;
- _H setPos [(getPos _H) select 0, (getPos _H) select 1, 10];
- // Set Pilot behaviour
- _H_G setCombatMode "BLUE";
- _H_G setBehaviour "CARELESS";
- _H_G setSpeedMode "FULL";
- _H flyinheight 0;
- // Create H1's first waypoint at generated LZ
- private _H_W1 = _H_G addWaypoint [_pos_Spawn, 0];
- _H_W1 setWaypointType "HOLD";
- private _H_W2 = _H_G addWaypoint [getPos _H_LZ, 0];
- _H_W2 setWaypointType "TR UNLOAD";
- // Pilot behaviour to S&D-friendly settings on completion (?)
- _H_W2 setWaypointStatements ["true",""];
- _H_W2 setWaypointSpeed "LIMITED";
- // Create H1's search-and-destroy waypoint at selected player
- private _H_W3 = _H_G addWaypoint [getPosATL hunt_alias, 0];
- _H_W3 setWaypointType "SAD";
- // H1_W2 setWaypointBehaviour "AWARE";
- _H_W3 setWaypointSpeed "LIMITED";
- _H_W3 setWaypointStatements ["True",""];
- // Create Infantry Group 1
- private _pos_Ispawn = [_pos_Spawn,20,0] call BIS_fnc_relPos;
- private _I_G = createGroup [east, true]; // explicitly mark for cleanup
- private _I_U = _I_G createUnit ["O_Soldier_SL_F", _pos_Ispawn, [], 0, "NONE"];
- private _I_L = group _I_U selectLeader _I_U;
- private _counter = 0;
- while {_counter < 12} do { // {_counter < # } - Num units of type to spawn
- _newUnit = "O_Soldier_F" createUnit [_pos_Ispawn, _I_G];
- _newUnit = "O_Soldier_F" createUnit [_pos_Ispawn, _I_G];
- _newUnit = "O_Soldier_LAT_F" createUnit [_pos_Ispawn, _I_G];
- _newUnit = "O_Soldier_AR_F" createUnit [_pos_Ispawn, _I_G];
- _counter = _counter + 4;
- };
- // Create _I "GETIN" waypoint at _H
- private _I_W1 = _I_G addWaypoint [getPosATL _H, 0];
- _I_W1 setWaypointType "GETIN";
- _I_W1 waypointAttachVehicle _H;
- [_H_G,1] synchronizeWaypoint [_I_G,1];
- // Create _I "GETOUT" waypoint at _H_LZ
- private _I_W2 = _I_G addWaypoint [getPos _H_LZ, 0];
- _I_W2 setWaypointType "GETOUT";
- // Create infantry S&D waypoint at selected player's pos
- private _I_W3 = _I_G addWaypoint [getPosATL hunt_alias, 0];
- _I_W3 setWaypointType "SAD";
- _I_W3 setWaypointStatements ["true",""];
- sleep 10;
- _H flyinheight 20;
- // Transfer all AI to HC
- [true] call potato_zeusHC_fnc_transferGroupsToHC;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement