Jump to content
Sign in to follow this  
1para{god-father}

Removing dead BIS_fnc_spawnGroup

Recommended Posts

I am spawning in a group but after they all die i need to remove their bodies and the group , I thought i could just use deletevehicle but that does not work.

What is the best way to remove theses dead?

_grpradar = [getPos _name, east, _enemyCount] call BIS_fnc_spawnGroup;

Share this post


Link to post
Share on other sites

For deleting only that single group when they are all dead:

_grpradar = [getPos _name, east, _enemyCount] call BIS_fnc_spawnGroup;
_grpradar spawn {
_units = units _this;
waitUntil {sleep 2; ({alive _x} count _units) == 0};
{deleteVehicle _x} foreach _units;
deleteGroup _this;
};

Edit: updated above code, with deleting group aswell, to keep away from 144 group limit.

Note: only meant for man type units, if you use vehicles in your group, then setPos them before deleting, and add the vehicle to the _units array.

Or you can use my delete script wich handles any units, no matter when and how they are spawned.

Edited by Demonized
added deleteGroup _this into above code.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×