Simplify the victory check by nesting events and using [filter_condition]...

...instead of [if].
This commit is contained in:
J. Tyne 2013-02-02 00:19:32 +00:00
parent 72b7c9d94a
commit 4582bd0e1c

View File

@ -344,27 +344,25 @@ Note: You need to use the default map settings for the scenario to work right."
#enddef
#define VICTORY_CHECK_FROM_TURN TURN
# Delay the "die" event until the turn of the final spawn.
[event]
name=turn_{TURN}
[event]
name=die
first_time_only=no
[filter]
side=1
[/filter]
[if]
[variable]
name=turn_number
greater_than={TURN}
[/variable]
[then]
[if]
[filter_condition]
[not]
[have_unit]
side=1
side=1,2
x=1-15
y=8-22
[/have_unit]
[/not]
[then]
[/filter_condition]
[music]
name=victory.ogg
play_once=yes
@ -378,10 +376,7 @@ Note: You need to use the default map settings for the scenario to work right."
[endlevel]
result=victory
[/endlevel]
[/then]
[/if]
[/then]
[/if]
[/event]
[/event]
#enddef