Page 1 of 1

Removing an entire unit

Posted: Fri Mar 07, 2008 9:03 pm
by lodilefty
I am trying to
  1. select a specific brigade [Valley Brigade, 6 elements]
  2. remove the entire brigade


I can remove 1 element of the selected unit via:

.......
EvalUnqUnit = Valley Brigade

Actions
RemoveCuSubUnit = NULL
.......

Do I have to repeat this 6 times? Will that work?
Is there a 'RemoveUnit' command that I haven't found?

Thanks

Posted: Fri Mar 07, 2008 9:42 pm
by Primasprit
Hi!

There is indeed such an command.
Here an example from AACW:

Code: Select all

SelectFaction = $CSA
SelectRegion = $Vera Cruz
StartEvent = evt_nam_CSA_FrenchInterventionMexico1862|1|2|evt_txt_CSA_FrenchInterventionMexico1862|Event-img_CSA_FrenchInterventionMexico1862|$Vera Cruz|114

Conditions
  MinDate = 1862/02/01
  MaxDate = 1862/12/01
  Probability = 50

Actions
  DescEvent = evt_desc_CSA_FrenchInterventionMexico1862
  EvalUnqUnit = Vera Cruz Militia

  SelUnqUnit = Vera Cruz Militia
  RemoveCuUnit

Posted: Sat Mar 08, 2008 12:03 am
by lodilefty
Thank you! :king:

I just couldn't find it! :bonk:

Posted: Sun Mar 09, 2008 10:42 am
by Pocus
Better is to use a new command that can even find the unit if embedded into another. It select and delete the unit in one pass.

Syntax is RemoveUnqUnit = UnitName or RemUnqUnit = UnitName