User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Removing an entire unit

Fri Mar 07, 2008 9:03 pm

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
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Fri Mar 07, 2008 9:42 pm

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

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Sat Mar 08, 2008 12:03 am

Thank you! :king:

I just couldn't find it! :bonk:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sun Mar 09, 2008 10:42 am

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
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 7 guests