How does one filter units based on traits

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.
User avatar
Col Lightbeam
Posts: 46
Joined: November 18th, 2008, 1:01 am

Re: How does one filter units based on traits

Post by Col Lightbeam »

Well thank you...

Does it seem reasonable that one could use

Code: Select all

[kill] *all on void terrain without spacewalker* [/kill]
instead of

Code: Select all

[store_unit]
with the

Code: Select all

[if]
[have_unit]
[filter]
x=$x1
y=$y1
[filter_location]
terrain="Xv"
[/filter_location]
[not]
[filter_wml]
    [modifications]
        [trait]
            id=spacewalker
        [/trait]
    [/modifications]
[/filter_wml]
[/not]
[/filter]
[/have_unit]
[then]
...

[/then]
[/if]
but basing it on the *if* coding?

... This operating system will soon be upgraded, meaning wesnoth with it...
If I am lucky, my copying 1.4 onto a flash-drive will have saved it and allowed its operation later :hmm: ...

And would someone send me the location of Wesnoth 1.4 source code that is inside an rtf or similar file? I am having trouble with archived files like those that end in "tar.xdelta" as in "wesnoth-1.4.1.tar-wesnoth-1.5.0a.tar.xdelta". If not a text file, then something which would allow me to bypass "tar.xdelta"
Mix Era Of Magic, Era of Myths, and Extended Era and you get all my favorite teams on one group! and ULTIMATE POWER!!!!!!!!!!!!

Also in the programming industry... later.
Post Reply