I'm currently experimenting with event modding. I want to remove the CSA Potomac HQ (Army HQ), disbanding the CSA Army of the Potomac. A second event creates Lee's Army of Northern Virginia. The problem is, not only the CSA HQ is removed, the HQ of the USA Army of the Potomac is removed as well.
How can I ensure the script is only removing the CSA HQ and leaving the USA HQ untouched ?
Can somebody help ?
Code: Select all
StartEvent = evt_KICSA_ArmyPotomacEnd|1|0|NULL|NULL|$Richmond, VA|NULL
Conditions
MinDate = 1862/04/01
MaxDate = 1862/06/01
CheckAILevel = 1
EvalUnqUnit = Army of the Potomac
Actions
[B][size=134]SelectFaction = $CSA
SelUnqSubUnit = Potomac HQ
AlterCuSubUnit = ApplyToList;Kill[/size][/B]
EndEvent
StartEvent = evt_KICSA_ArmyNVLee|1|0|NULL|NULL|$Richmond, VA|NULL
Conditions
MinDate = 1862/04/01
MaxDate = 1862/06/01
CheckAILevel = 1
EvalUnqUnit = Robert E. Lee
EvalUnqUnit = Army of Northern Virginia;NOT
Actions
SelectFaction = $CSA
SelUnqSubUnit = Robert E. Lee
RemoveCuSubUnit = NULL
AddToRegList = $Richmond, VA;$Dinwiddie, VA;$Norfolk, VA;$Granville, NC;$Sampson, NC;$Wake, NC
PickFromRegList = NotEnemy;NotAdj
CreateGroup
Posture = $Defensive
SetKind = $Land
Entranch = 4
InCS = 0
FixType = 1
SetName = Army of Northern Virginia
Apply
CreateUnit
GMEParam = Army of Northern Virginia
SetType = $uni_CSA_Hq2
SetLevel = 6
SetName = Army of Northern Virginia
Apply
CreateUnit
SetCommit = 1
SetType = $uni_CSA_RELee4
SetName = Robert E. Lee
Apply
CreateUnit
SetType = $uni_CSA_VolBde
SetLevel = 6
Apply
CreateUnit
SetType = $uni_CSA_VolBde
SetLevel = 6
Apply
CreateUnit
SetType = $uni_CSA_Art5VA
SetLevel = 6
Apply
CreateUnit
SetType = $uni_CSA_Sup1VA
SetLevel = 2
Apply
EndEvent