kleaner2 0 Posted April 30, 2002 I am looking to include a casualty count in a mission. I would like to track the following by group: wounded dead Let's say I have a group called testgroup. How do I go through the array to figure out whether each one's dammage level? Do it through a loop? Is there an eaiser way? Ideas? Thanks. Share this post Link to post Share on other sites
Spinor 0 Posted April 30, 2002 The Count command could be useful for this, I would do it the following way: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,, _group = _this select 0 ;this determines the initial number of units when calling ;the script _initialNumber = Count (Units _group) #Loop  _units = Units _group  ;counting all alive units  _alive = "Alive _x" Count _units  ;calculating casualties since initialization  _casualties = _initialNumber - _alive  ;counting all alive units with damage > 0.5  _wounded = "(Alive _x) AND ((GetDammage _x) > 0.5)" Count _units  Hint Format ["Casualties: %1\nWounded: %2", _casualties, _wounded]  ~30 Goto "Loop" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,;;; Call this script with group as argument like  [testgroup] exec "CasualtyCount.sqs". It should hint the number of casualties since calling the script and the number of wounded (Damage > 0.5) every 30 seconds. Instead of checking the damage, you could also check for  !(CanStand _x) which returns true when the unit is unable to walk. Hope this helps, Spinor Share this post Link to post Share on other sites
kleaner2 0 Posted April 30, 2002 Thanks for the help. That looks like an excellent script. I will have to try it later. Share this post Link to post Share on other sites