count – Talk
Jump to navigation
Jump to search
NomDePlume (talk | contribs) (Note on the notes) |
(code examples) |
||
Line 4: | Line 4: | ||
--[[User:Nomdeplume|nomdeplume]] 10:24, 4 January 2010 (CET) | --[[User:Nomdeplume|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. --[[User:Kronzky|Kronzky]] 16:17, 4 January 2010 (CET) |
Revision as of 16:17, 4 January 2010
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)