Format tweaks to troup_transport
This commit is contained in:
parent
f19f9f3c99
commit
3d6ec00155
|
@ -1,65 +1,74 @@
|
|||
_troup_transport = _this select 0;
|
||||
_transport_group = (group (driver _troup_transport));
|
||||
_start_pos = getpos _troup_transport;
|
||||
_dat_objective = ([getpos _troup_transport] call F_getNearestBluforObjective) select 0;
|
||||
_unload_distance = 1000;
|
||||
params [
|
||||
["_transVeh", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (isNull _transVeh) exitWith {};
|
||||
sleep 1;
|
||||
_initial_crewcount = count crew _troup_transport;
|
||||
|
||||
waitUntil { sleep 0.2; !(alive _troup_transport) || !(alive (driver _troup_transport)) || (((_troup_transport distance _dat_objective) < _unload_distance) && (!(surfaceIsWater (getpos _troup_transport)))) };
|
||||
private _transGrp = (group (driver _transVeh));
|
||||
private _start_pos = getpos _transVeh;
|
||||
private _objPos = ([getpos _transVeh] call F_getNearestBluforObjective) select 0;
|
||||
private _unload_distance = 1000;
|
||||
private _crewcount = count crew _transVeh;
|
||||
|
||||
if ((alive _troup_transport) && (alive (driver _troup_transport))) then {
|
||||
_troupgrp = createGroup [GRLIB_side_enemy, true];
|
||||
waitUntil {
|
||||
sleep 0.2;
|
||||
!(alive _transVeh) ||
|
||||
!(alive (driver _transVeh)) ||
|
||||
(((_transVeh distance _objPos) < _unload_distance) && !(surfaceIsWater (getpos _transVeh)))
|
||||
};
|
||||
|
||||
while {(count (waypoints _troupgrp)) != 0} do {deleteWaypoint ((waypoints _troupgrp) select 0);};
|
||||
if ((alive _transVeh) && (alive (driver _transVeh))) then {
|
||||
_infGrp = createGroup [GRLIB_side_enemy, true];
|
||||
|
||||
{
|
||||
[_x, _start_pos, _troupgrp, "PRIVATE", 0.5] call F_createManagedUnit;
|
||||
[_x, _start_pos, _infGrp, "PRIVATE", 0.5] call F_createManagedUnit;
|
||||
} foreach (["army"] call F_getAdaptiveSquadComp);
|
||||
|
||||
{ _x moveInCargo _troup_transport } foreach (units _troupgrp);
|
||||
while {(count (waypoints _troupgrp)) != 0} do {deleteWaypoint ((waypoints _troupgrp) select 0);};
|
||||
{_x moveInCargo _transVeh} forEach (units _infGrp);
|
||||
|
||||
while {(count (waypoints _infGrp)) != 0} do {deleteWaypoint ((waypoints _infGrp) select 0);};
|
||||
|
||||
sleep 3;
|
||||
|
||||
_transport_waypoint = _transport_group addWaypoint [getpos _troup_transport, 0,0];
|
||||
_transport_waypoint setWaypointType "TR UNLOAD";
|
||||
_transport_waypoint setWaypointCompletionRadius 200;
|
||||
private _transVehWp = _transGrp addWaypoint [getpos _transVeh, 0,0];
|
||||
_transVehWp setWaypointType "TR UNLOAD";
|
||||
_transVehWp setWaypointCompletionRadius 200;
|
||||
|
||||
_troops_waypoint = _troupgrp addWaypoint [getpos _troup_transport, 0];
|
||||
_troops_waypoint setWaypointType "GETOUT";
|
||||
_troops_waypoint setWaypointCompletionRadius 200;
|
||||
private _infWp = _infGrp addWaypoint [getpos _transVeh, 0];
|
||||
_infWp setWaypointType "GETOUT";
|
||||
_infWp setWaypointCompletionRadius 200;
|
||||
|
||||
_troops_waypoint synchronizeWaypoint [_transport_waypoint];
|
||||
_infWp synchronizeWaypoint [_transVehWp];
|
||||
|
||||
{ unassignVehicle _troup_transport } forEach (units _troupgrp);
|
||||
_troupgrp leaveVehicle _troup_transport;
|
||||
(units _troupgrp) allowGetIn false;
|
||||
{unassignVehicle _transVeh} forEach (units _infGrp);
|
||||
_infGrp leaveVehicle _transVeh;
|
||||
(units _infGrp) allowGetIn false;
|
||||
|
||||
_troops_waypoint_2 = _troupgrp addWaypoint [getpos _troup_transport, 250];
|
||||
_troops_waypoint_2 setWaypointType "MOVE";
|
||||
_troops_waypoint_2 setWaypointCompletionRadius 5;
|
||||
private _infWp_2 = _infGrp addWaypoint [getpos _transVeh, 250];
|
||||
_infWp_2 setWaypointType "MOVE";
|
||||
_infWp_2 setWaypointCompletionRadius 5;
|
||||
|
||||
waitUntil { sleep 0.3; _initial_crewcount >= count crew _troup_transport };
|
||||
waitUntil {sleep 0.5; _crewcount >= count crew _transVeh};
|
||||
|
||||
sleep 5;
|
||||
|
||||
while {(count (waypoints _transport_group)) != 0} do {deleteWaypoint ((waypoints _transport_group) select 0);};
|
||||
while {(count (waypoints _transGrp)) != 0} do {deleteWaypoint ((waypoints _transGrp) select 0);};
|
||||
|
||||
_waypoint2 = _transport_group addWaypoint [_dat_objective, 100];
|
||||
_waypoint2 setWaypointType "SAD";
|
||||
_waypoint2 setWaypointSpeed "NORMAL";
|
||||
_waypoint2 setWaypointBehaviour "COMBAT";
|
||||
_waypoint2 setWaypointCombatMode "RED";
|
||||
_waypoint2 setWaypointCompletionRadius 30;
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "SAD";
|
||||
_transVehWp setWaypointSpeed "NORMAL";
|
||||
_transVehWp setWaypointBehaviour "COMBAT";
|
||||
_transVehWp setWaypointCombatMode "RED";
|
||||
_transVehWp setWaypointCompletionRadius 30;
|
||||
|
||||
_waypoint2 = _transport_group addWaypoint [_dat_objective, 100];
|
||||
_waypoint2 setWaypointType "SAD";
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "SAD";
|
||||
|
||||
_waypoint2 = _transport_group addWaypoint [_dat_objective, 100];
|
||||
_waypoint2 setWaypointType "CYCLE";
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "CYCLE";
|
||||
|
||||
sleep 10;
|
||||
|
||||
[_troupgrp, true] spawn battlegroup_ai;
|
||||
[_infGrp] spawn battlegroup_ai;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue