Page 1 of 1
CountUnits command
Posted: Mon Mar 03, 2008 7:24 pm
by lodilefty
Given a command line:
[color="Red"]CountUnits = $Great Plains;0;$USA;-1;<;3[/color]
Parameters are:
[INDENT]
$Great Plains where to count the units
0
$USA Which factions units to count
-1
< less than
3 how many units must be found to get a 'true' result[/INDENT]
I understand this to be "True if USA has less than 3 units in Great Plains."
Questions:
- What does the '0' do?
- What does the '-1' do?
- Is a unit anything that exists as a unit [UID] in the Units folder/database?
Thank you
Posted: Tue Mar 04, 2008 9:13 am
by Pocus
0 means you are giving the alias to a region, not an area
-1 means any type and not a particular unit type
3. yes
Posted: Tue Mar 04, 2008 9:18 am
by Jabberwock
Thank you

Posted: Tue Mar 04, 2008 12:29 pm
by lodilefty
Pocus wrote:0 means you are giving the alias to a region, not an area
-1 means any type and not a particular unit type
3. yes
Thank you very much!
What are the other valid values for the two variables you define?
I think it's tme to start a section in the Wiki, eh?

Posted: Tue Mar 04, 2008 12:58 pm
by Jabberwock
Too late; but you're welcome to edit what is already there.
Posted: Tue Mar 04, 2008 1:16 pm
by lodilefty
Jabberwock wrote:Too late; but you're welcome to edit what is already there.
I sure hope that's a new entry...

Posted: Tue Mar 04, 2008 1:17 pm
by Jabberwock

Define new. Thanks for the assist, Rafiki.
Posted: Tue Mar 04, 2008 1:23 pm
by lodilefty
Jabberwock wrote: 
Define new. Thanks for the assist, Rafiki.
New [in this case] = since Pocus answered the question......

Posted: Tue Mar 04, 2008 2:53 pm
by Rafiki
Jabberwock wrote: 
Define new. Thanks for the assist, Rafiki.
My pleasure
For those looking for it:
http://www.ageod.net/aacwwiki/CountUnits
Posted: Tue Mar 04, 2008 2:59 pm
by lodilefty
Is this the 'unit type' definition list?
// SubTypes
$Regular = 0
$Irregular = 1
$Militia = 2
$Cavalry = 3
$Artillery = 4
$Arty = 4
$SupplyType = 5
$Ship = 6
[from \Aliases\SubTypes (of units&models).ini
Posted: Wed Mar 05, 2008 2:20 pm
by Pocus
lodilefty wrote:Is this the 'unit type' definition list?
// SubTypes
$Regular = 0
$Irregular = 1
$Militia = 2
$Cavalry = 3
$Artillery = 4
$Arty = 4
$SupplyType = 5
$Ship = 6
[from \Aliases\SubTypes (of units&models).ini
yes
Posted: Wed Mar 05, 2008 2:28 pm
by lodilefty
Thank you very much, Sir!
