What syntax does [filter_location] use?
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.
-
- Posts: 38
- Joined: June 17th, 2011, 1:26 am
What syntax does [filter_location] use?
So, I've been creating a scenario with a sighted event. The wiki says that name=sighted events are buggy and are to be avoided, so I did, and the wiki suggests using [filter_location] tags inside a moveto event instead, so I am trying to. But I can't seem to get the event to fire properly! The event fires everywhere the player travels, no matter what I try to do.
I've tried replacing x,y= with x= & y=; I've tried various combinations of [filter_location] and [filter_vision], but the event fires no matter what the player can see.
Code: Select all
[event]
name=moveto
[filter]
side=1
[filter_vision]
viewing_side=1
x,y=5-7,12-14
[/filter_vision]
[/filter]
. . .
[/event]
Currently working on various ideas using 1.9.8.9
Re: What syntax does [filter_location] use?
That [filter_vision] means that side 1 can see the unit, which is a side 1 unit. This will always be true.
There are several options posted in the forums as possible sighted replacements, but none of them is totally perfect. Here is a link to a pretty simple example that combines sighted event with [filter_vision] and moveto:
http://forums.wesnoth.org/viewtopic.php ... 66#p443466
Also check the wiki article itself:
http://wiki.wesnoth.org/FilterWML#Filtering_Vision
As you can see, [filter_vision] does not accept x or y attributes.
There are several options posted in the forums as possible sighted replacements, but none of them is totally perfect. Here is a link to a pretty simple example that combines sighted event with [filter_vision] and moveto:
http://forums.wesnoth.org/viewtopic.php ... 66#p443466
Also check the wiki article itself:
http://wiki.wesnoth.org/FilterWML#Filtering_Vision
As you can see, [filter_vision] does not accept x or y attributes.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
-
- Posts: 38
- Joined: June 17th, 2011, 1:26 am
Re: What syntax does [filter_location] use?
So I'm fundamentally misunderstanding what the tag does? Ah well, I have a (relatively) quick workaround in mind. Thanks.
Currently working on various ideas using 1.9.8.9