mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
29 lines
823 B
Plaintext
29 lines
823 B
Plaintext
diag_log format["ejectSquad called, _this: %1", _this];
|
|
private _lz = _this select 0
|
|
private _vehicle = _this select 1;
|
|
private _squad = _this select 2;
|
|
private _fromTaskId = _this select 3;
|
|
|
|
deleteWaypoint [_squad,1];
|
|
|
|
{_x action["eject", vehicle _x]} forEach units _squad;
|
|
{unAssignVehicle _x} forEach units _squad;
|
|
{_x enableAI "TARGET"; _x enableAI "AUTOTARGET";} foreach units _squad;
|
|
|
|
private wp = _squad addwaypoint [_lz,5,1];
|
|
wp setwaypointType "MOVE";
|
|
|
|
scopeName "main";
|
|
while {true} do
|
|
{
|
|
scopeName "ejectloop";
|
|
if (((_x in _vehicle) && (alive _x)} count units _group) == 0) then
|
|
{
|
|
// No squad units left alive inside
|
|
[_fromTaskId, "SUCCEEDED" ,true] spawn BIS_fnc_taskSetState;
|
|
breakOut "ejectloop";
|
|
};
|
|
sleep 2;
|
|
};
|
|
diag_log format["ejectSquad done, _this: %1", _this];
|