[Solved] Applying a filter in a tag

Discussion of Lua and LuaWML support, development, and ideas.

Moderator: Forum Moderators

Post Reply
white_haired_uncle
Posts: 1288
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

[Solved] Applying a filter in a tag

Post by white_haired_uncle »

I'd like to implement this:

Code: Select all

               
[make_units_wander]
	[filter]
              side=2
         [/filter]
         radius=3
         max_x=44
         max_y=33
[/make_units_wander]
I have function wesnoth.wml_actions.make_units_wander(cfg) working fine, except for the filter part. I want to pass that filter to wesnoth.units.find_on_map(). Currently, no matter what I try I get all units on the map. At this point, I'm just guessing stuff. How do I access that [filter] block inside make_units_wander, and how do I pass that to find_on_map?

TIA
Last edited by white_haired_uncle on July 18th, 2023, 7:47 pm, edited 1 time in total.
Speak softly, and carry Doombringer.
User avatar
Ravana
Forum Moderator
Posts: 3070
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Applying a filter in a tag

Post by Ravana »

white_haired_uncle
Posts: 1288
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

Re: [Solved] Applying a filter in a tag

Post by white_haired_uncle »

perfect, thanks!
Speak softly, and carry Doombringer.
Post Reply