DMprecache.scr is a game script and should not be altered. Typically,
mymapname_precache.scr is used to precache (pre-load) models and large sound files -- so there is no pause to load them during the game.
A "cvar" is a client variable. They are set by the game, but you can set some of them too. Here is an example.
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Destroyed Village"
Not all scripts have a main: thread. Most scripts are loaded by your
mymapname.scr script as they are needed. Look for the "
exec" lines.
Code: Select all
// DESTROYED VILLAGE
// ARCHITECTURE: NED
// SCRIPTING: NED
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Destroyed Village"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm2"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr // pre-load the normal DM game models.
exec global/door_locked.scr::lock // runs a thread named "lock:" in a global folder script.
level.script = maps/dm/mohdm2.scr
exec global/ambient.scr mohdm2 // adds background sounds
level waittill spawn
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based 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 = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
That script is typical for a multiplayer map -- in this case, mohdm2 (Destroyed Village). I don't know what you mean by "method", but threads start with a name and a collon like this, "
mythread:". And, they end with the word "
end". The "
//" marks are for script comments and are not read by the game.
Hope that helps!