Hello
A small gift for you guys lovers of baserace, done by one baserace hater. To celebrate my 1-year badge, I've fixed the mapscript so when time is out the team ahead will win, or it'll be a tie, but map will end.
No more infinite maptime, no more free SR for axis.
And for the freaks who wanna know how I did it, it's simple: the script was missing the timelimit_hit trigger
Also, I copied from other mapscripts (darji2 to be precise).
So, you have to set always a winner (axis or allies) at beginning of the game, otherwise the game gets stuck in 0:00 timelimit.
// Winner on expiration of round timer (0=Axis, 1=Allies)
wm_setwinner 0
Then in game_manager there is a trigger called timelimit_hit that, guess what, it triggers when timelimit is hit. There we should add all the logic to find the winner, but the baserace script has already another trigger called 'findwinner' so it makes life easier:
trigger timelimit_hit
{
trigger game_manager findwinner
}
And last, is to add one line into 'findwinner' script: wm_setwinner -1 ("it's a tie!" when the other 2 conditions don't apply)
trigger findwinner
{
wm_setwinner -1
accum 3 abort_if_equal 0
wm_setwinner 1
accum 3 abort_if_greater_than -1
wm_setwinner 0
}
That's it, enjoy baserace_desert for the rest of your life
baserace_desert.script