so, you have to know if it is a percentage out of what, as in out 100 soldiers, how many are left. 10 soldiers is a nice easy number to show you the workings, and you should be able to change it to however many there really are...
first you make your trigger, with its condition somet like a radio (ie: "How many people are left" radio alpha) or somet like true, to have it constantly updated. Now, im gonna do this as if u want it to pop up on the screen, then it fades....
you have to create an array with all ur units, to do this, you have to type somwhere:
unitcountarray = [unit1,unit2,unit3,unit4,unit5,unit6,unit7,unit8,unit9,unit10]
until all of your units are in the array, and name it something relevant. then you will have to type somewhere, in the on activation of that trigger:
[10,unitcountarray] exec "trooppercent.sqs"
where 10 is your maximum number of units then alt-tab out of ofp, and create a text document in the relevant folder, type in this:
_total = _this select 0
_uca = _this select 1
_a = East countside _uca
_factor = 100/_total
_answ = _a*_factor
hint format ["There are %_answ percent of enemies left"]
exit
oh yea, make sure you rename the text document trooppercent.sqs otherwise it wont work, and you may have to view file extensions, to do this you go to tools > folder options > view > view file extensions
that's it... I think I may have messed up on the format bit, but the rest is pretty clear cut, test it out, and if it works, great!
also, the East can be west, civ, guer or logic, depending on what side the enemy is....