Talk:Manipulating the game menu items

From Valve Developer Community
Revision as of 04:17, 24 October 2007 by Danm36 (talk | contribs)
Jump to navigation Jump to search

You can use: "OnlyInGame" "1" to make a menu entry only appear when a game is launched. Is there any way to implement the opposite effect (i.e. a menu entry only appears before when a game is not launched)? --Daktor 10:55, 6 Sep 2006 (PDT)

I think you would have to put "Onlyinmenu" "1" or "Notingame" "1". I'll test these out now.

In GameMenu.res, an entry of this type: "command" "engine xxx" will launch the con_command "xxx". Other entries are of the type: "command" "OpenServerBrowser", where is the implementation for "OpenServerBrowser". It doesn't seem to map to a con_command, so what does it map to? --Daktor 11:36, 6 Sep 2006 (PDT)


In reference to the above, to run a map directly from a menu command, an entry of the type "command" "engine map mymap" will do the trick, and can be used for (eg) training maps, or just to bypass the chapter selection screen. --Winston 11:02, 2 Jun 2007 (UTC)

Conditional items

Does anybody know how to add a section that only appears when certain conditions are met other than the 'notmulti' 'notingame' etc. as I want a button called 'Bonus maps' only to appear when sv_unlockedchapters 4 is met (When the MOD is complete) This is what I have made.

	"13"
	{
		"label" "Bonus maps"
		"command" "engine map Bonus1"
		"sv_unlockedchapters" "4"                <--Doesn't work
	}

Danm36 09:08, 23 Oct 2007 (PDT)

You would need code to do that. --TomEdwards 10:51, 23 Oct 2007 (PDT)
O.K. Thanks. Danm36 04:16, 24 Oct 2007 (PDT)