filtering on a list of roles
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.
filtering on a list of roles
Hi,
In the wiki for StandardUnitFilter, you can use a comma separated list to
Like
Does this apply to the
Thanks
In the wiki for StandardUnitFilter, you can use a comma separated list to
[or]
the filters.Like
race=drake,dwarf
is similar to race=drake [or] race=dwarf [/or]
Does this apply to the
role=
tag? Can I give a comma separated list of roles? The wiki didn't specify.Thanks
Re: filtering on a list of roles
Test it and document the way it is.
Re: filtering on a list of roles
Seems the assigned role itself can have a comma. So no, you have to use
[or]
in the filter for it to work, it cannot be a list.Code: Select all
[event]
name=prestart
[unit]
side=1
type=White Mage
role=Angel
placement=leader
[/unit]
[unit]
side=1
type=Red Mage
role=Devil
placement=leader
[/unit]
[/event]
[event]
name=moveto
first_time_only=no
[filter]
# This did not work for either.
# role="Angel","Devil"
# role=Angel,Devil
# This worked
role=Angel
[or]
role=Devil
[/or]
[/filter]
[message]
speaker=unit
message="I'm the $unit.role"
[/message]
[/event]