conditional modify unit type
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.
-
- Posts: 19
- Joined: June 22nd, 2022, 8:57 pm
conditional modify unit type
Is it possible to have a [modify_unit_type] tag conditional of an option.
this is my [checkbox] nested in an [option] tag.
Am I using the [if] tag incorrectly or is this not possible the way I'm trying it?
All of this is in a [modification] top level tag.
this is my [checkbox] nested in an [option] tag.
Code: Select all
[checkbox]
id=eoua_nightblade
name=_"Orcish Nightblade"
description=_"Allow Orcish Slayer to advance to Orcish Nightblade"
[/checkbox]
Code: Select all
[if]
[variable]
name=eoua_nightblade
boolean_equals=true
[/variable]
[then]
[modify_unit_type]
type="Orcish Slayer"
add_advancement="Orcish Nightblade"
[/modify_unit_type]
[/then]
[/if]
All of this is in a [modification] top level tag.
- Celtic_Minstrel
- Developer
- Posts: 2194
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: conditional modify unit type
No.
If you want the advancement to depend on a variable, you can handle "unit placed" and/or "advance" events and use
[modify_unit_type]
is not an ActionWML tag. It can only go in an addon (like [campaign]
).If you want the advancement to depend on a variable, you can handle "unit placed" and/or "advance" events and use
[modify_unit]
or [object]
(or both) to add the advancement.