thank you so much . I will test it asapQuick thought (haven't got time to properly think about or test this right now, am busy with rl stuff):
Arrays (lists) of types, races etc. can be used (this worked in my test campaign).
(Apologies for the awful indenting, was scribbled down in a mad rush!)If you always use the same arrangement of conditions (sameCode:
[event] name=ftest first_time_only=no[if] [have_unit] type=$ftypetest race=$fracetest [/have_unit][then] [message] type=$ftypetest race=$fracetest message=_"I am the first unit matching filter""type=$ftypetest""""race=$fracetest""" [/message][/then][else] [message] speaker=narrator message=_"No unit matched filter""type=$ftypetest""""race=$fracetest""" [/message][/else][/if][/event] [event] name=side 1 turn 1{DEBUG_MSG (_"Filter test")}{VARIABLE ftypetest "Skeleton,Spearman,Ghoul"}{VARIABLE fracetest "drake,human,wolf"}[fire_event] name=ftest[/fire_event] [/event]
[and]
,[not]
,[or]
) then this should do most of what you need?
If you also want to dynamically add conditions there may be clever ways to do this in WML with, possibly,[have_unit]
withcount=0
(to test if the[not]
is satisfied),$$
,[insert_tag]
and/orglob_on
. But I'm afraid I'm out of time, sorry.
No doubt kind folk cleverer than me can help you out!
Good luck,
cheers!
-- Spannerbag
Statistics: Posted by hermestrismi — Today, 8:20 am