Wow, Krieg, I strongly suspect there's a better way to do this, but I'm pretty stumped for right now.
If it's any help,
in a different thread, dr. seltsam showed me a way to create an array containing only alive units from another array.
_u_ar=[p1,p2,p3,p4,p5,p6]
_a_ar=[]
{if (alive _x) then {_a_ar=_a_ar+[_x]}} foreach _u_ar
if (count _a_ar == 0) then {hint "Error"; exit}
You could fill _u_ar with the names of the red wolf units, and change the conditional to something like
{if (getdammage _x > 0 && getdammage _x <=0.5) then {_a_ar=_a_ar+[_x]}} foreach _u_ar
Create more arrays for undamaged units, heavily damaged units, and dead units. Now you would have the red wolf units sorted according to their status. Then, you might find some way to use the
format command to put this information into sideChat or sideRadio. Unfortunately, I tried to figure out how you'd do that and was stumped.
EDIT: If you sort them into arrays as above, you can definitely generate a sitrep as follows:
sideChat format ["This is Red Wolf leader here, we have %1 tanks undamaged, %2 tanks slightly damaged, %3 tanks severely damaged, and %4 tanks destroyed. Out.", count _nodamagearray, count _minordamagearray, count _majordamagearray, count _destroyedarray]
It's definitely more elegant programming. On the other hand, it won't tell you exactly which units went down (if that's important), and it won't account for English verb agreement (it may say "we have 1 tanks undamaged"). So if you don't mind Red Wolf sounding like a computer, use the above.
EDIT 2: Or even better, I
believe the sideChat solution will actually work with simply the following, skipping the "array sorting" step, where
redwolf is the name of the Red Wolf group:
sideChat format ["This is Red Wolf leader here, we have %1 tanks undamaged, %2 tanks slightly damaged, %3 tanks severely damaged, and %4 tanks destroyed. Out.", "getdammage _x == 0" count units redwolf, "getdammage _x > 0 && getdammage _x <= 0.5" count units redwolf, "getdammage _x > 0.5 && getdammage _x <= 0.9" count units redwolf, "getdammage _x > 0.9" count units redwolf]