Page 1 of 1

NCP Ulm Event, will this work?

Posted: Sun Nov 04, 2012 7:52 am
by BigDuke66
Hi
Can someone take a look at this and tell me if this will work?

StartEvent 1
Conditions NULL
MinDate 1805/10/01
SelectSubUnits Region $Ulm|Families $famElite $famLine $famHvyCavalry $famCavalry|FactionTags $F05
EvalSubUnitCount >=; 40
SelectSubUnits Region $Stuttgart|Families $famElite $famLine $famHvyCavalry $famCavalry|FactionTags $F05
EvalSubUnitCount >=; 12
SelectSubUnits Region $Nordlingen|Families $famElite $famLine $famHvyCavalry $famCavalry|FactionTags $F05
EvalSubUnitCount >=; 12
SelectSubUnits Region $Ravensburg|Families $famElite $famLine $famHvyCavalry $famCavalry|FactionTags $F05
EvalSubUnitCount >=; 12
SelectSubUnits Region $Ludwigshafen|Families $famElite $famLine $famHvyCavalry $famCavalry|FactionTags $F05
EvalSubUnitCount >=; 12
Actions NULL
SelectSubUnits Region $Ulm|FactionTags AUS
SelectSubUnits Region $Stuttgart|FactionTags AUS
SelectSubUnits Region $Nordlingen|FactionTags AUS
SelectSubUnits Region $Ravensburg|FactionTags AUS
SelectSubUnits Region $Ludwigshafen|FactionTags AUS
AlterCuSubUnit ApplytoList|Kill
GenTextMsg evt_nam_UlmSurrender1805|1|NULL|NULL|NULL
DescEvent evt_desc_CMN_UlmSurrender1805
EndEvent NULL


Plan is that the amount of French subunits is checked and if enough are there, the Austrian units in the defined regions should be killed.
I'm worried that the selected French subunits in the upper part of the event will get killed too, or does the selction of subunits "restart" after the "Actions" cell?

Posted: Sun Nov 04, 2012 12:24 pm
by lodilefty
Run it and see! I'm not sure!

I would hope it resets each time, or your contitions will also accumulate!

See also: http://www.ageod.net/agewiki/Registry for a way to accumulate a total, or do "OR" logic!

Posted: Mon Nov 05, 2012 11:37 am
by Pocus
Each time you use SelectSubUnits, the currently select sub units are unselected... So that would work theoretically. Practically, I find the way it is scripted very prone to error. You have put several tests in the same event, so they must ALL be true to trigger the event. Is it what you want?

Posted: Mon Nov 05, 2012 4:48 pm
by BigDuke66
Yes that's what I want, the player should be forced to close any plausible line of retreat if he does that the Austrians surrender.

Posted: Tue Nov 06, 2012 11:52 am
by Pocus
So this is only for a PBEM or for the player... the AI can't do something that clever.

Posted: Tue Nov 06, 2012 5:11 pm
by BigDuke66
Indeed, PBEM is the target.