Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- params [ "_targetsector" ];
- private _targetpos = getMarkerPos _targetsector;
- private _spawnsector = ( [ sectors_airspawn , [ _targetpos ] , { (markerpos _x) distance _input0 }, "ASCEND"] call BIS_fnc_sortBy ) select 0;
- private _chopper_type = selectRandom opfor_choppers;
- private _newvehicle = createVehicle [ _chopper_type, markerpos _spawnsector, [], 0, "FLY"];
- createVehicleCrew _newvehicle;
- sleep 0.1;
- private _pilot_group = group ((crew _newvehicle) select 0);
- _newvehicle addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
- { _x addMPEventHandler ["MPKilled", {_this spawn kill_manager}]; } foreach (crew _newvehicle);
- private _para_group = createGroup EAST;
- while { count units _para_group < 8 } do {
- opfor_paratrooper createUnit [ getmarkerpos _spawnsector, _para_group, 'this addMPEventHandler ["MPKilled", {_this spawn kill_manager}]'];
- };
- { _x moveInCargo _newvehicle } foreach (units _para_group);
- if (isNil "_pilot_group") exitWith { deleteVehicle _newvehicle; };
- while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
- while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
- sleep 0.2;
- {_x doFollow leader _pilot_group} foreach units _pilot_group;
- {_x doFollow leader _para_group} foreach units _para_group;
- sleep 0.2;
- _targetpos = [_targetpos select 0, _targetpos select 1];
- _waypoint = _pilot_group addWaypoint [ _targetpos, 25];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointSpeed "NORMAL";
- _waypoint setWaypointBehaviour "CARELESS";
- _waypoint setWaypointCombatMode "BLUE";
- _waypoint setWaypointCompletionRadius 100;
- _waypoint = _pilot_group addWaypoint [ _targetpos, 25];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointSpeed "NORMAL";
- _waypoint setWaypointBehaviour "CARELESS";
- _waypoint setWaypointCombatMode "BLUE";
- _waypoint setWaypointCompletionRadius 100;
- _waypoint = _pilot_group addWaypoint [ _targetpos, 700];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointCompletionRadius 100;
- _waypoint = _pilot_group addWaypoint [ _targetpos, 700];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointCompletionRadius 100;
- _waypoint = _pilot_group addWaypoint [ _targetpos, 700];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointCompletionRadius 100;
- _pilot_group setCurrentWaypoint [ _pilot_group, 1];
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointSpeed "NORMAL";
- _waypoint setWaypointBehaviour "COMBAT";
- _waypoint setWaypointCombatMode "RED";
- _waypoint setWaypointCompletionRadius 50;
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "MOVE";
- _waypoint setWaypointCompletionRadius 50;
- _pilot_group setCurrentWaypoint [ _para_group, 1];
- _newvehicle flyInHeightASL [400, 400, 20];
- waitUntil { sleep 1;
- !(alive _newvehicle) || (damage _newvehicle > 0.2 ) || (_newvehicle distance2D _targetpos < 400 )
- };
- _newvehicle flyInHeightASL [400, 400, 20];
- {
- unassignVehicle _x;
- moveout _x;
- sleep 0.5;
- } foreach (units _para_group);
- _newvehicle flyInHeightASL [400, 400, 20];
- if ( {alive _x} count units _pilot_group == 0) exitWith {};
- sleep 0.2;
- while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
- while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
- sleep 0.2;
- {_x doFollow leader _pilot_group} foreach units _pilot_group;
- {_x doFollow leader _para_group} foreach units _para_group;
- sleep 0.2;
- _newvehicle flyInHeightASL [400, 400, 10];
- if ( {alive _x} count units _pilot_group == 0) exitWith {};
- _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
- _waypoint setWaypointBehaviour "COMBAT";
- _waypoint setWaypointCombatMode "RED";
- _waypoint setWaypointType "SAD";
- _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
- _waypoint setWaypointBehaviour "COMBAT";
- _waypoint setWaypointCombatMode "RED";
- _waypoint setWaypointType "SAD";
- _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
- _waypoint setWaypointBehaviour "COMBAT";
- _waypoint setWaypointCombatMode "RED";
- _waypoint setWaypointType "SAD";
- _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
- _waypoint setWaypointType "SAD";
- _waypoint = _pilot_group addWaypoint [ _targetpos, 200];
- _waypoint setWaypointType "SAD";
- _pilot_group setCurrentWaypoint [ _pilot_group, 1];
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "SAD";
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "SAD";
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "SAD";
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "SAD";
- _waypoint = _para_group addWaypoint [ _targetpos, 100];
- _waypoint setWaypointType "SAD";
- _pilot_group setCurrentWaypoint [ _para_group, 1];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement