Ehr... Let me show an example;
I'm thinking of making a group of 12 - where it says "myGroup = group this" in the leader's init field.
Then a trigger for that group saying;
condition; count units myGroup == 0
execution field; [myGroup] exec "removeBodies.sqs"
Then the removeBodies.sqs could have this code;
{deleteVehicle _x} forEach units myGroup
Now I know the above code doesn't work, because the above group array
wouldn't contanin any soldiers - since they are removed from the group
list when they die. And that is exactly what I'm after - a list that lists all the units no matter what if they are dead or not.
I've made custom unit arrays before - like yPlayers = [aP1, aP2, aP3] (an example) and used forEach to perform different tasks on that array... Example;
{removeAllWeapons _x; _x addMagazine "m16"; _x addWeapon "m16"} forEach yPLayers
Note that the "units" function isn't applicable here for standard arrays.
But I don't want to define those in a advance - I want the trigger waiting for everybody to die to do that based on what is initially in the myGroup.
Yeah, I know - I suck at explaining things... :p Sorry..
ZNorQ