attack filter problem
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.
attack filter problem
I'm trying to change the ranged attack of a Rogue unit and have tried several things with the attack filter. In all cases, all the existing attacks were changed, so the filter failed to identify the correct attack.
Try 1:
Try 2:
What's wrong?
Try 1:
Code: Select all
[effect]
apply_to=attack
[filter]
range=ranged
[/filter]
set_name="crossbow"
set_special=marksman
set_type=pierce
increase_damage=1
[/effect]
Code: Select all
[effect]
apply_to=attack
[filter]
name=knife
[/filter]
set_name="crossbow"
set_special=marksman
set_type=pierce
increase_damage=1
[/effect]
Try some Multiplayer Scenarios / Campaigns
Har.zookeeper wrote:The weapon filter shouldn't go inside a [filter] block.


Many thanks for a question promptly answered!

Try some Multiplayer Scenarios / Campaigns
I agree, it's sometimes annoying that the filtering behaviour is not consistent. Although I don't think there are that many places where the [filter] tag is not used for a filter, so maybe this could easily be fixed some time in the future.Rhuvaen wrote:Har.zookeeper wrote:The weapon filter shouldn't go inside a [filter] block.'tis confusing, when you can go without [filter] and when not (maybe because I'm a non-smoker
).