Filter all reachable locations for a unit?

The place to post your WML questions and answers.

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.
Post Reply
weewah
Posts: 101
Joined: October 31st, 2019, 7:11 pm

Filter all reachable locations for a unit?

Post by weewah »

Is there a simple way to filter all locations that a unit can reach?

If the unit is a flying unit that has 1 movement cost over everything I can just use radius = MP remaining, but most units aren't like that. Mounted units are especially annoying because there can be holes (mountains, deep water, etc.) in the large area they can reach.
User avatar
octalot
General Code Maintainer
Posts: 783
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Filter all reachable locations for a unit?

Post by octalot »

If this is in a context where you can run [store_reachable_locations] first, then you could use StandardLocationFilter's find_in= attribute.
Post Reply