Conditional advancement path?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Conditional advancement path?
I am building a campaign, and I want a particular unit to be able to advace into another unit, if certain conditions are met.
These conditions would be checked at the start of each scenario, through a variable.
Is it possible, and if so, how?
I tried to look up the definition of ENABLE_ANCIENT_LICH (or a similar macro) in hopes it would help, but could not find it, nor the file that is supposed to contain it.
These conditions would be checked at the start of each scenario, through a variable.
Is it possible, and if so, how?
I tried to look up the definition of ENABLE_ANCIENT_LICH (or a similar macro) in hopes it would help, but could not find it, nor the file that is supposed to contain it.
Re: Conditional advancement path?
I would wait until that particular condition is done, and then add that special advancement to the unit via [ object]
Re: Conditional advancement path?
*facepalms*
[object]. I was trying something similar, with just [modify_unit], which was not working. I will try this.
Edit: I did get it to work with [object]
[object]. I was trying something similar, with just [modify_unit], which was not working. I will try this.
Edit: I did get it to work with [object]
Re: Conditional advancement path?
Depending on how you write it, you might need to remove the object after it advances, otherwise it would advance back into that type.
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Conditional advancement path?
That's easy to avoid, just make the
Other than using an
[effect]
conditional on the unit being of its original type.Other than using an
[object]
, a conditional advancement could also be done with an AMLA, which can directly transform the unit's type and thus look outwardly like a regular advancement… although that route makes more sense if you want all units of a given type to have access to that advancement under certain conditions.- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Conditional advancement path?
The ENABLE_ANCIENT_LICH macro uses [modify_unit_type], which apparently can't go in a scenario anyway. It's in data/core/macros/optional_unit_advancements.cfg if you are still interested in taking a look at it.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide