CVARS, am I doing this right?
Posted: Mon Jul 12, 2004 8:21 pm
trying here to set up the variables that can be controlled before the round, a few different methods of play... and some timing options...
first I set the defaults, then I have the script read the cvars. If the cvar is not set, it should keep the default right? also, im not positive of my syntax... strings go in quotes?
anyway does this look proper?
first I set the defaults, then I have the script read the cvars. If the cvar is not set, it should keep the default right? also, im not positive of my syntax... strings go in quotes?
anyway does this look proper?
Code: Select all
config_setup:
//defaults
level.mode = "conquest"
level.flag_capturetime = 50 //tenths
level.flag_recapturetime = 50 //tenths
level.conquest_wintime = 30 //seconds
level.score_noscoretime = 60 //seconds
level.score_finalstage = 60 //seconds
//gametypes -- conquest - score - capture
level.mode = getcvar (capture_mode)
//flag capture times
level.flag_capturetime = (int) getcvar (conquest_capturetime)
level.flag_recapturetime = (int) getcvar (conquest_recapturetime)
//conquest options
level.conquest_wintime = (int) getcvar (conquest_wintime)
//push options
level.score_noscoretime = (int) getcvar (score_noscoretime)
level.score_finalstage = (int) getcvar (score_finalstage)
end