Time limits please help

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Rick

Time limits please help

Post by Rick »

I have my script for a roundbased, everything works fine except when i launch the game and somone joins there is no time limit. i set draw in the roundbased thread. when we run the game on our server [DaDs] it has a 20 min time limit. could you pls take a look. I want a 5 min round based map.
here it is:
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "ALLIES:Investigate"
setcvar "g_obj_alliedtext2" "Axis activity near"
setcvar "g_obj_alliedtext3" "Temple of Anubis"
setcvar "g_obj_axistext1" "AXIS:..If it wasnt"
setcvar "g_obj_axistext2" "for those pesky"
setcvar "g_obj_axistext3" "Allies...."

setcvar "g_scoreboardpic" "texture/mohmenu/dmloading/anubis1.tga"

$world farplane_color "0.452941 0.452941 0.452941"
level.fogplane = 9000
$world farplane level.fogplane

level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/ambient.scr mohdm7
exec global/door_locked.scr::lock


level.script = maps/dm/anubis.scr

level waittill spawn

end

//-----------------------------------------------------------------------------

roundbasedthread:

// Can specify different scoreboard messages for round based games here.

level waitTill prespawn

level waittill spawn

// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = draw // set to axis, allies, kills, or draw

level waittill roundstart

end
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Server time limit overrides level time limit :roll: .

Maybe it's possible to set a server-side time limit using this code:
server "timelimit 5"
or
setcvar "timelimit" "5"
Image
Guest

Post by Guest »

Thanks, the only thing i dont understand is why the stock game maps have a 5 min limit but mine does not? dm7 for instance has a 5 min round
is there something missing from my script that causes my map to have a 20 min round vice the 5 min that i set in the round thread?
Guest

Post by Guest »

Hey i figured it out

if(level.roundbased)
thread roundbasedthread
was missing, thanks for your help. Great site -rick
Post Reply