count – Talk
Jump to navigation
Jump to search
No edit summary |
m (Reverted edits by Heecf..... (talk) to last revision by Kronzky) |
||
Line 1: | Line 1: | ||
I | 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 | ||
<code>{damage _x < 1} count units</code> | |||
--[[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 00:24, 21 August 2012
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)