Page 1 of 1

New Command: EvalSubUnitCount

Posted: Wed May 21, 2008 4:11 pm
by Pocus
EvalSubUnitCount = <Operator>;<Value>

Once you do a selection of sub-units (aka elements) with SelectSubUnit(s) you can want to do a test versus the number selected. This is where the command kick in. It is much more powerful than the old CountUnits, which is counting at the unit level and have less selection possibilities.

The valid operators, are, as usual: <, >, <=, >=, =, DICE

For example

EvalSubUnitCount = <=;10

Is: 'do I have selected at most 10 elements with SelectSubUnits'. The 'March to Richmond' event can be vastly improved with that, counting only line regiments and cavalries for example.

Posted: Wed May 28, 2008 1:02 pm
by lodilefty
I am trying to create 'Sanitation is Poor' event as a variation on 'epidemics'.

I want to select the largest Army, and apply the losses only if that group exceeds 4 CP.

Is that attached going to work?