mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
/*
|
|
Delete alive AI.
|
|
by Ghostrider
|
|
|
|
--------------------------
|
|
License
|
|
--------------------------
|
|
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
|
|
|
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
*/
|
|
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
|
|
|
for "_i" from 1 to (count GMS_liveMissionAI) do {
|
|
if ((_i) <= count GMS_liveMissionAI) then {
|
|
_units = GMS_liveMissionAI deleteAt 0;
|
|
_units params ["_missionCenter","_unitsarr","_timer"];
|
|
|
|
if (diag_tickTime > _timer) then
|
|
{
|
|
private _nearplayer = [_missionCenter,800] call GMS_fnc_nearestPlayers;
|
|
if (_nearPlayer isEqualTo []) then
|
|
{
|
|
{
|
|
private _unit = _x;
|
|
if ((alive _unit) && {!(isNull objectParent _unit)}) then {
|
|
[objectParent _unit] call GMS_fnc_deleteAIvehicle;
|
|
};
|
|
[_unit] call GMS_fnc_deleteAI;
|
|
} forEach _unitsarr;
|
|
} else {
|
|
GMS_liveMissionAI pushback _units;
|
|
};
|
|
} else {
|
|
GMS_liveMissionAI pushback _units;
|
|
};
|
|
};
|
|
};
|