Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. params [ "_targetsector" ];
  2. private _targetpos = getMarkerPos _targetsector;
  3. private _spawnsector = ( [ sectors_airspawn , [ _targetpos ] , { (markerpos _x) distance _input0 }, "ASCEND"] call BIS_fnc_sortBy ) select 0;
  4.  
  5. private _chopper_type = selectRandom opfor_choppers;
  6. private _newvehicle = createVehicle [ _chopper_type, markerpos _spawnsector, [], 0, "FLY"];
  7. createVehicleCrew _newvehicle;
  8. sleep 0.1;
  9.  
  10. private _pilot_group = group ((crew _newvehicle) select 0);
  11.  
  12. _newvehicle addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
  13. { _x addMPEventHandler ["MPKilled", {_this spawn kill_manager}]; } foreach (crew _newvehicle);
  14.  
  15. private _para_group = createGroup EAST;
  16. while { count units _para_group < 8 } do {
  17. opfor_paratrooper createUnit [ getmarkerpos _spawnsector, _para_group, 'this addMPEventHandler ["MPKilled", {_this spawn kill_manager}]'];
  18. };
  19.  
  20. { _x moveInCargo _newvehicle } foreach (units _para_group);
  21. if (isNil "_pilot_group") exitWith { deleteVehicle _newvehicle; };
  22. while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
  23. while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
  24. sleep 0.2;
  25. {_x doFollow leader _pilot_group} foreach units _pilot_group;
  26. {_x doFollow leader _para_group} foreach units _para_group;
  27. sleep 0.2;
  28.  
  29. _targetpos = [_targetpos select 0, _targetpos select 1];
  30. _waypoint = _pilot_group addWaypoint [ _targetpos, 25];
  31. _waypoint setWaypointType "MOVE";
  32. _waypoint setWaypointSpeed "NORMAL";
  33. _waypoint setWaypointBehaviour "CARELESS";
  34. _waypoint setWaypointCombatMode "BLUE";
  35. _waypoint setWaypointCompletionRadius 100;
  36. _waypoint = _pilot_group addWaypoint [ _targetpos, 25];
  37. _waypoint setWaypointType "MOVE";
  38. _waypoint setWaypointSpeed "NORMAL";
  39. _waypoint setWaypointBehaviour "CARELESS";
  40. _waypoint setWaypointCombatMode "BLUE";
  41. _waypoint setWaypointCompletionRadius 100;
  42. _waypoint = _pilot_group addWaypoint [ _targetpos, 700];
  43. _waypoint setWaypointType "MOVE";
  44. _waypoint setWaypointCompletionRadius 100;
  45. _waypoint = _pilot_group addWaypoint [ _targetpos, 700];
  46. _waypoint setWaypointType "MOVE";
  47. _waypoint setWaypointCompletionRadius 100;
  48. _waypoint = _pilot_group addWaypoint [ _targetpos, 700];
  49. _waypoint setWaypointType "MOVE";
  50. _waypoint setWaypointCompletionRadius 100;
  51. _pilot_group setCurrentWaypoint [ _pilot_group, 1];
  52.  
  53. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  54. _waypoint setWaypointType "MOVE";
  55. _waypoint setWaypointSpeed "NORMAL";
  56. _waypoint setWaypointBehaviour "COMBAT";
  57. _waypoint setWaypointCombatMode "RED";
  58. _waypoint setWaypointCompletionRadius 50;
  59. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  60. _waypoint setWaypointType "MOVE";
  61. _waypoint setWaypointCompletionRadius 50;
  62. _pilot_group setCurrentWaypoint [ _para_group, 1];
  63.  
  64. _newvehicle flyInHeightASL [400, 400, 20];
  65.  
  66. waitUntil { sleep 1;
  67. !(alive _newvehicle) || (damage _newvehicle > 0.2 ) || (_newvehicle distance2D _targetpos < 400 )
  68. };
  69.  
  70. _newvehicle flyInHeightASL [400, 400, 20];
  71.  
  72. {
  73. unassignVehicle _x;
  74. moveout _x;
  75. sleep 0.5;
  76. } foreach (units _para_group);
  77.  
  78. _newvehicle flyInHeightASL [400, 400, 20];
  79. if ( {alive _x} count units _pilot_group == 0) exitWith {};
  80. sleep 0.2;
  81. while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
  82. while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
  83. sleep 0.2;
  84. {_x doFollow leader _pilot_group} foreach units _pilot_group;
  85. {_x doFollow leader _para_group} foreach units _para_group;
  86. sleep 0.2;
  87.  
  88. _newvehicle flyInHeightASL [400, 400, 10];
  89. if ( {alive _x} count units _pilot_group == 0) exitWith {};
  90. _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
  91. _waypoint setWaypointBehaviour "COMBAT";
  92. _waypoint setWaypointCombatMode "RED";
  93. _waypoint setWaypointType "SAD";
  94. _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
  95. _waypoint setWaypointBehaviour "COMBAT";
  96. _waypoint setWaypointCombatMode "RED";
  97. _waypoint setWaypointType "SAD";
  98. _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
  99. _waypoint setWaypointBehaviour "COMBAT";
  100. _waypoint setWaypointCombatMode "RED";
  101. _waypoint setWaypointType "SAD";
  102. _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
  103. _waypoint setWaypointType "SAD";
  104. _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
  105. _waypoint setWaypointType "SAD";
  106. _pilot_group setCurrentWaypoint [ _pilot_group, 1];
  107. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  108. _waypoint setWaypointType "SAD";
  109. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  110. _waypoint setWaypointType "SAD";
  111. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  112. _waypoint setWaypointType "SAD";
  113. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  114. _waypoint setWaypointType "SAD";
  115. _waypoint = _para_group addWaypoint [ _targetpos, 100];
  116. _waypoint setWaypointType "SAD";
  117. _pilot_group setCurrentWaypoint [ _para_group, 1];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement