problem with filter_side
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.
problem with filter_side
Hello,
I'm having an issue with store_side and filter_side. I want to store only the sides that have a specific team_name, but it seems to be storing all sides regardless of the filter.
Full code is https://github.com/virtualghetto/Vaelia ... s.cfg#L725
Please help, thanks.
I'm having an issue with store_side and filter_side. I want to store only the sides that have a specific team_name, but it seems to be storing all sides regardless of the filter.
Code: Select all
[event]
name=start
[store_side]
[filter_side]
team_name=GangTeam
user_team_name= _ "Axis Gang"
[/filter_side]
variable=temp_enemies
[/store_side]
[if]
{VARIABLE_CONDITIONAL temp_enemies.length greater_than 0}
[then]
[message]
side=1
[and]
canrecruit=yes
[/and]
message=_"They allied themselves against us!"
[/message]
[/then]
[/if]
{CLEAR_VARIABLE temp_enemies}
Please help, thanks.
Re: problem with filter_side
Take out the
[filter_side]
tag, [store_side]
is itself a filter.Re: problem with filter_side
That worked. Indeed, the wiki does say not to do what I did.
https://wiki.wesnoth.org/FilterWML/Exam ... conditions.
Thank you
https://wiki.wesnoth.org/FilterWML/Exam ... conditions.
Thank you