Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 2199

WML Workshop • Re: Disable Weapon HP

$
0
0
Usually this is how I see wml, usually I get things in the first attempt, because it is designed to be easily understandable, even so the wiki is lacking some examples.

Considering the formula: it seems solid, even so I'm not sure if it should be bracked with ().

I somehow would question how you nested the filter_self - from my perspective it should be filter_self and than include the weapon special, but in your case you use the filter for the weapon special in itself. As filter self is a Standard Filter which should work according to the wiki, there is nothing wrong with that.

Keep in mind:
A formula using Wesnoth Formula Language. The self variable is set to the current $this_unit, and the formula should return a boolean. If it returns 0, the filter does not match. Otherwise, the filter does match. (Version 1.13.5 and later only)
So it could be that by chance it got the right result. You should definitely test it in a number of situations by building test scenarios and play with it.

Statistics: Posted by Heindal — Yesterday, 4:27 pm



Viewing all articles
Browse latest Browse all 2199

Trending Articles