Advertisement
Morbo513

asdf

Mar 26th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.09 KB | None | 0 0
  1. if(!isServer) exitWith {};
  2. _random = selectrandom [1,2,3,4,5,6,7];
  3.  
  4. if (_random>7) then {hint "Roll H failed!";}
  5. else
  6. {
  7. private _pos_Spawn = getMarkerPos selectrandom ["QRF_H1_S","QRF_H2_S","QRF_H3_S"];
  8.  
  9. //sleep 1800; // 30-minute countdown
  10. hint "QRF H";
  11.  
  12. // Create invisible helipad for helicopter to land on and as point-of-reference for waypoint creation
  13. private _H_LZ = "Land_HelipadEmpty_F" createVehicle [0,0,0];
  14. // Get random position 200-300m away in random direction from randomly selected player - depends on alias_hunt.sqf
  15.  
  16. private _pos_H_LZ = [hunt_alias, 200, 300, 10, 0, 10, 0] call BIS_fnc_findSafePos;
  17. //pos_H1_LZ = [hunt_alias,200+random 100, random 360] call BIS_fnc_relPos;
  18. _H_LZ setpos _pos_H_LZ;
  19.  
  20. // Create Helicopter 1 at Spawn Marker
  21. private _H_AR = [_pos_Spawn, 0, "rhs_mi8mt_vdv", EAST] call bis_fnc_spawnVehicle;
  22. private _H = _H_AR select 0;
  23. _H engineOn false;
  24. private _H_G = _H_AR select 2;
  25. // Orient helicopter to LZ
  26. private _H_DIR = _H getDir _H_LZ;
  27. _H setDir _H_DIR;  
  28. _H setPos [(getPos _H) select 0, (getPos _H) select 1, 10];
  29.  
  30. // Set Pilot behaviour
  31. _H_G setCombatMode "BLUE";
  32. _H_G setBehaviour "CARELESS";
  33. _H_G setSpeedMode "FULL";
  34.  
  35. _H flyinheight 0;
  36.  
  37. // Create H1's first waypoint at generated LZ
  38. private _H_W1 = _H_G addWaypoint [_pos_Spawn, 0];
  39. _H_W1 setWaypointType "HOLD";
  40.  
  41. private _H_W2 = _H_G addWaypoint [getPos _H_LZ, 0];
  42. _H_W2 setWaypointType "TR UNLOAD";
  43. // Pilot behaviour to S&D-friendly settings on completion (?)
  44. _H_W2 setWaypointStatements ["true",""];
  45. _H_W2 setWaypointSpeed "LIMITED";
  46.  
  47. // Create H1's search-and-destroy waypoint at selected player
  48. private _H_W3 = _H_G addWaypoint [getPosATL hunt_alias, 0];
  49. _H_W3 setWaypointType "SAD";
  50. // H1_W2 setWaypointBehaviour "AWARE";
  51. _H_W3 setWaypointSpeed "LIMITED";
  52. _H_W3 setWaypointStatements ["True",""];
  53.  
  54.  
  55.  
  56. // Create Infantry Group 1
  57.  
  58.  
  59. private _pos_Ispawn = [_pos_Spawn,20,0] call BIS_fnc_relPos;
  60. private _I_G = createGroup [east, true]; // explicitly mark for cleanup
  61. private _I_U = _I_G createUnit ["O_Soldier_SL_F", _pos_Ispawn, [], 0, "NONE"];
  62. private _I_L = group _I_U selectLeader _I_U;
  63.  
  64. private _counter = 0;
  65. while {_counter < 12} do { // {_counter < # } - Num units of type to spawn
  66.     _newUnit = "O_Soldier_F" createUnit [_pos_Ispawn, _I_G];
  67.     _newUnit = "O_Soldier_F" createUnit [_pos_Ispawn, _I_G];
  68.     _newUnit = "O_Soldier_LAT_F" createUnit [_pos_Ispawn, _I_G];
  69.     _newUnit = "O_Soldier_AR_F" createUnit [_pos_Ispawn, _I_G];
  70.     _counter = _counter + 4;
  71. };
  72.  
  73.  
  74. // Create _I "GETIN" waypoint at _H
  75. private _I_W1 = _I_G addWaypoint [getPosATL _H, 0];
  76. _I_W1 setWaypointType "GETIN";
  77. _I_W1 waypointAttachVehicle _H;
  78. [_H_G,1] synchronizeWaypoint [_I_G,1];
  79.  
  80. // Create _I "GETOUT" waypoint at _H_LZ
  81. private _I_W2 = _I_G addWaypoint [getPos _H_LZ, 0];
  82. _I_W2 setWaypointType "GETOUT";
  83.  
  84.  
  85. // Create infantry S&D waypoint at selected player's pos
  86. private _I_W3 = _I_G addWaypoint [getPosATL hunt_alias, 0];
  87. _I_W3 setWaypointType "SAD";
  88. _I_W3 setWaypointStatements ["true",""];
  89.  
  90. sleep 10;
  91. _H flyinheight 20;
  92.  
  93. // Transfer all AI to HC
  94. [true] call potato_zeusHC_fnc_transferGroupsToHC;
  95. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement