The map will end when a winning team has
been specified in the script, and the game
ending conditions have been met.
The instruction wm_setwinner is
used to specify the winning team:
- -1 = No winning team specified yet
- 0 = Axis win
- 1 = Allies win
In the tutorial script, we have set
wm_setwinner to 0 right at the start, so
that if the game time expires, Axis will
win.
What we will do is add some script to
make the allies win if they blow the gate.
Open the tutorial.script file, and add
this line at the end of the gate death
trigger:
- trigger game_manager allies_win
So when the gate is blown up, the last
thing the death trigger does is call
(execute) the allies_win trigger in
the game_manager procedure.
Add this script after the closing
"}" of the spawn trigger in the
game_manager procedure, but before the
closing "}" of the game_manager
itself.:
trigger allies_win |
|
{ |
|
|
wm_announce "The
Allies blew up the gate!"
wm_setwinner 1
wait 3000
wm_endround |
} |
|
|