OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Captain Winters 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)
-
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.
-
Thanks Deaddog!
*Adds to list of credits*
Tanks! :D
-
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)
-
That is correct sir.
Just put that in the init line of one of the units in the group.
;)
-
Thanks, bud.
Tanks! 8)