Page 1 of 1

setcvar g_gametype problem

Posted: Mon Dec 13, 2004 2:09 am
by Deutsche Dogge
Hi guys, i tried to find revelant info in the forums but i can't find any answer.

I extracted the AA mohdmx/obj_teamx scr files to modify them and placed them in a "user_modname.pk3" of the main folder.

I added setcvar "g_gametype" "4" right after the main: of each map but it doesn't work.
Server keeps telling me cannot load objective map in non-objective mode though i set the correct values (2 for team/4 for obj)

I even tried set g_gametype 4 without success.
It works only with Spearhead but not with AA :?

Posted: Mon Dec 13, 2004 2:42 am
by agentmad007
i think the correct syntax should be :

Code: Select all

level.gametype = 4

and the scr have to be in a maps/obj folder

Posted: Mon Dec 13, 2004 1:24 pm
by bdbodger
maybe try setting the cvar after level waittill spawn so the map has time to load first .

Posted: Tue Dec 14, 2004 1:16 pm
by Deutsche Dogge
the g_gametype must be specified first, thus the "Cannot load objective map in non-objective mode". message. Also, there is some verification if the level is roundbased before the waittil spawn

Code: Select all

main:

// putting it here works with SH but not in AA
setcvar "g_gametype" "2"

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Southern France"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "mohdm1"

	// 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

	level.script = maps/dm/mohdm1.scr
	exec global/ambient.scr mohdm1

	//exec global/ambient.scr mohdm2

	//$world farplane 5000
	//$world farplane_color (.333 .333 .329)


	level waittill spawn
	$world farclipoverride -1
end

roundbasedthread:
 ...
calling additional map setup, so g_gametype must be before this line.

I haven't found solution yet. Why does it work in SH and not AA? :cry:

Posted: Tue Dec 14, 2004 1:37 pm
by Elgan
because the bsp was compiled as objective;0?

Posted: Tue Dec 14, 2004 2:22 pm
by bdbodger
hmm usually you can set any cvar after the game has started but I never tried to set it myself .

Posted: Tue Dec 14, 2004 3:54 pm
by Deutsche Dogge
Elgan wrote:because the bsp was compiled as objective;0?
:?:

You haven't read everything:

Setting g_gametype to 2 for dm maps and to 4 for obj maps.
works for SH , not works for AA

Re: setcvar g_gametype problem

Posted: Tue Dec 14, 2004 7:15 pm
by panTera
Deutsche Dogge wrote:I extracted the AA mohdmx/obj_teamx scr files to modify them and placed them in a "user_modname.pk3" of the main folder.
As far as I know in objective mode the game only reads the bsp files in the obj folder. You probably need to extract the .bsp-files too and place the DM maps in the obj-folder and the Objective maps in the dm-folder. (?)

Re: setcvar g_gametype problem

Posted: Tue Dec 14, 2004 11:31 pm
by Elgan
panTera wrote:
Deutsche Dogge wrote:I extracted the AA mohdmx/obj_teamx scr files to modify them and placed them in a "user_modname.pk3" of the main folder.
As far as I know in objective mode the game only reads the bsp files in the obj folder. You probably need to extract the .bsp-files too and place the DM maps in the obj-folder and the Objective maps in the dm-folder. (?)
that's prob the nail, it works on SP maps as they are not in dm or obj., the bsp was compiled as single and put in just maps.

Posted: Thu Dec 16, 2004 3:35 pm
by Deutsche Dogge
I solved the problem using this the bottom of my cfg file:

Code: Select all

// Cr?er les alias pour la rotation
set map01 "g_gametype 4; fraglimit 30; timelimit 10; roundlimit 0; map obj/obj_team1; set nextmap vstr map02" 
set map02 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm1; set nextmap vstr map03" 
set map03 "g_gametype 4; fraglimit 30; timelimit 10; roundlimit 0; map obj/obj_team2; set nextmap vstr map04" 
set map04 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm2; set nextmap vstr map05" 
set map05 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm3; set nextmap vstr map06" 
set map06 "g_gametype 4; fraglimit 30; timelimit 10; roundlimit 0; map obj/obj_team3; set nextmap vstr map07" 
set map07 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm4; set nextmap vstr map08" 
set map08 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm5; set nextmap vstr map09" 
set map09 "g_gametype 4; fraglimit 30; timelimit 10; roundlimit 0; map obj/obj_team4; set nextmap vstr map10" 
set map10 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm6; set nextmap vstr map11" 
set map11 "g_gametype 2; fraglimit 30; timelimit 10; roundlimit 0; map dm/mohdm7; set nextmap vstr map01

// laisser la variable sv_maplist vide
seta sv_maplist ""

//d?marrer la premi?re map de la rotation
vstr map01
and commented out the g_gametype in the maps .scr files.