Problems with [filter_ability]
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.
Problems with [filter_ability]
Hey I'm giving some units the hidden skirmisher ability like this and it works:
But it doesn't work, when I want to remove that ability:
Does somebody know the reason and could help me?
Code: Select all
[modify_unit]
[filter]
side=4
formula = "self.hitpoints < 12"
[not]
id = Rormuk the Butcher
[/not]
[not]
role = cowards
[/not]
[/filter]
moves = "$($this_unit.max_moves)"
name = $this_unit.name + " the Coward"
role = cowards
[abilities]
[skirmisher]
cumulative=no
id=cowardsrun
affect_self=yes
[/skirmisher]
[/abilities]
[/modify_unit]
Code: Select all
[modify_unit]
[filter]
role = cowards
[filter_adjacent]
id = Tragtrad
[/filter_adjacent]
[/filter]
side = 1
[effect]
apply_to=remove_ability
[filter_ability]
id=cowardsrun
[/filter_ability]
[/effect]
[/modify_unit]
Re: Problems with [filter_ability]
[filter_ability] looks correct. You have some non-filter-ability logic in these examples too. Try testing without those.
Re: Problems with [filter_ability]
It's [experimental_filter_ability] the wiki is not up-to-date.
"If gameplay requires it, they can be made to live on Venus." -- scott
-
- Code Contributor
- Posts: 174
- Joined: October 6th, 2017, 12:57 pm
Re: Problems with [filter_ability]
in 1.18 the filter ability are yet experimental, it's why you find experiemntal_ in tag_name of filter, it will be removedlater in devellopement branch when some modifications and corrections will be added
-
- Posts: 1285
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Problems with [filter_ability]
What about
or something similar, I don't know if that would match id=cowardsrun, I suspect not, but I think the idea could be made to work?
Code: Select all
[filter]
ability_type_active=cowardsrun
[/filter]
Speak softly, and carry Doombringer.
-
- Code Contributor
- Posts: 174
- Joined: October 6th, 2017, 12:57 pm
Re: Problems with [filter_ability]
try with
Code: Select all
[modify_unit]
[filter]
role = cowards
[filter_adjacent]
id = Tragtrad
[/filter_adjacent]
[/filter]
side = 1
[effect]
apply_to=remove_ability
[experimental_filter_ability]
id=cowardsrun
tag_name=skirmisher
[/experimental_filter_ability]
[/effect]
[/modify_unit]
Re: Problems with [filter_ability]
[experimental_filter_ability] worked,
thanks a lot guys!
thanks a lot guys!