“Loffy your are absolutely correct in what I am looking for:�
The first map that made this possible to my knowledge was 1337-mapper Loffy’s epic “loffys_ctf_prefab2�. You can download the pk3 here and it contains the script AND .map file (that’s why it is called “prefab�):
http://www.acc.umu.se/~loffy/mapping/maps/loffysctfprefab/loffysctfprefab.htm
The game starts with the score 0-0. If the score is 0-0 (or 1-1. 2-2. and so on) when the timelimit is hit, the game ends with a draw.
This is how I did it:
The game starts with setwinner 1 (or 0). Why? Well, it is just so. For some odd reason, someone must be set as a winner at game start.
Whenever a team scores, the scripts checks to see if that team has enough scores to be victorious. In my CTF-style maps (Darji2, loffy’s ctf prefab2 and Mayhem) I use the number 7. There are 7 flags/items all in all to steal.
In Baserace beta 2, “the first team to complete all 18 constructions / upgrades or have the most completed when the timer runs out wins!” (from the maps’ Read Me file).
In my map loffys_ctf-prefab2, when a team captures (scores), the script checks to see if score = 7. If yes, then setwinner 1 (again) or setwinner 0, depending on what team it is.
Then there’s a wait command (The wait is 1,5 seconds). This is important. Then the command “end round” follows. (For baserace beta2 it would be 18 instead of 7.)
So far, no problems. But there is more.
Then there is a section in my script that gets automatically triggered (by the game engine) at full time. It is the timelimit hit part discussed above. When the timelimit is hit, the winner is set to -1 (wm_setwinner -1). But there is more, since this “timelimit hit” part also triggers another part of the script.
Let’s name this part Part B. It has one task: It checks to see if any of the two teams are in the lead. For example, Axis might lead 4-3 when the timelimit is hit. Part B of the script will terminate the game right away, if a team is in the lead. And that team is declared the winner. Speed is of the essence in Part B. Remember the 1,5 sec. wait above? That wait is there just to give time enough for Part B to “see” if either team deserves to win.
I’m sorry I do not have the time to make a test-script for you, for Baserace_beta2. But I suggest that the person/-s who will do it will examine the script I wrote for loffys_ctf_prefab2, with the aid of many helping mappers here at the SD forum – the best forum.
//Loffy