Home   Help Search Login Register  

Author Topic: Unit Count In Group?  (Read 585 times)

0 Members and 2 Guests are viewing this topic.

Captain Winters

  • Guest
Unit Count In Group?
« on: 19 Jun 2003, 21:56:05 »
Does anyone know a script that can tell how many units are left in a group?
For say... There are 10 total units are in a group, when at least six of them are killed, my objective is updated.
Any ideas?

Tanks! 8)

deaddog

  • Guest
Re:Unit Count In Group?
« Reply #1 on: 19 Jun 2003, 22:07:35 »
Allright!!! An easy one for a change.  ;D

?("alive _x" count units groupname ) < 5:"1" objstatus "done"

or

?count units groupname < 5:....

I like the "alive _x" version because it works faster.  


Captain Winters

  • Guest
Re:Unit Count In Group?
« Reply #2 on: 19 Jun 2003, 22:13:25 »
Thanks Deaddog!
*Adds to list of credits*

Tanks! :D

Captain Winters

  • Guest
Re:Unit Count In Group?
« Reply #3 on: 19 Jun 2003, 22:18:07 »
Oh, sorry another quick one.
The syntax for naming a group is:

groupname = group this

Right? It's needed for the above script! Is that syntax right?

Tanks! 8)

deaddog

  • Guest
Re:Unit Count In Group?
« Reply #4 on: 19 Jun 2003, 23:41:00 »
That is correct sir.

Just put that in the init line of one of the units in the group.

 ;)

Captain Winters

  • Guest
Re:Unit Count In Group?
« Reply #5 on: 19 Jun 2003, 23:44:22 »
Thanks, bud.

Tanks! 8)