count – Talk

From Bohemia Interactive Community
Revision as of 16:17, 4 January 2010 by Kronzky (talk | contribs) (code examples)
Jump to navigation Jump to search

The notes mention using {alive _x} count units to check how many are actually alive, but I don't think 'alive' updates any faster than the group, i.e. "alive unit" returns true until the leader discovers the unit is dead. So, a more accurate count can be obtained with

{damage _x < 1} count units

--nomdeplume 10:24, 4 January 2010 (CET)

Actually, 'units' is updated much slower than 'alive', but independently of that, the point of the examples isn't really to show an "optimal" piece of code, but rather to just demonstrate the syntax. A lot of the examples don't make any sense in a real-life application - they were just chosen because they were brief and got the point across. --Kronzky 16:17, 4 January 2010 (CET)