Filtering units by hitpoint range
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.
- Nyanyanyan
- Posts: 73
- Joined: May 11th, 2018, 10:40 pm
Filtering units by hitpoint range
I've got a problem filtering units via a hitpoint range (e.g. "under 20" or "10-30").
I cannot hard code all the different possible values since the threshold is variable.
The code
does not work, so I am out of ideas what to do here.
Any help would be appreciated.
I cannot hard code all the different possible values since the threshold is variable.
The code
Code: Select all
[filter]
[filter_wml]
hitpoints=1-$somevalue
[/filter_wml]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter]
Any help would be appreciated.
Author of Age of Lords and the Revolution and Civil War and Expendable Leaders 2 multiplayer mods.
- Nyanyanyan
- Posts: 73
- Joined: May 11th, 2018, 10:40 pm
Re: Filtering units by hitpoint range
Thanks a lot, didn't know this existed.
Author of Age of Lords and the Revolution and Civil War and Expendable Leaders 2 multiplayer mods.