Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 10 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Different .menus for diff gametype
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Sunday, May. 24, 2009 07:06 pm
Editing wm_quickmessages.menu to show different things for different gametypes:

Ok, we know that the game will only use wm_quickmessages.menu as the pop-up, and you cant change the name via script (its hard-coded), but you can use one menu file but show different things for different gametyps. Here is how:

1. using the built-in dvartest, and dvarshow functions you can display different things for different gametypes.

Here is a test example:

Code:
		itemDef
		{
			name			"window"
			visible			1
			rect			16 20 0 0
			origin			ORIGIN_QUICKMESSAGEWINDOW
			forecolor		1 1 1 1
			textfont		UI_FONT_NORMAL
			textscale		.24
			textaligny		8
			text			"@Test"
			dvartest		"g_gametype"
			showDvar		{ "tdm" }
			decoration
		}
		execKey "1" { close quickmessage; open quickcommands }

		itemDef
		{
			name			"window"
			visible			1
			rect			16 20 0 0
			origin			ORIGIN_QUICKMESSAGEWINDOW
			forecolor		1 1 1 1
			textfont		UI_FONT_NORMAL
			textscale		.24
			textaligny		8
			text			"@QUICKMESSAGE_1_COMMANDS"
			dvartest		"g_gametype"
			showDvar		{ "ctf", "sd", "dm", "hq" }
			decoration
		}
		execKey "1" { close quickmessage; open quickcommands }


As is clear, for gametype TDM, "test" is displayed in place of "commands"; for all other gametypes it's "commands".

2. The same key stroke (key: 1) opens the quickcommands menu, but that isnt the name of the menu - the code looks for game["menu_quickcommands"], so anything assigned to that will be opened.

edited on May. 24, 2009 03:09 pm by DemonSeed
Share |
stealthcod2
General Member
Since: Dec 23, 2008
Posts: 108
Last: Jul 13, 2009
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, May. 24, 2009 09:22 pm
Hmmmm, so could I make it so i have only 2 options on wm_quickmessage like on will be for zom and it is the edited quickcommands and then once i push like #1.0 on keyboard then I get a thing where i have 2 another options where its 1. Team Speech 2. What I want. . . Then when i push the team speech i get my 3 speech options. Then for the team chat for second time i would jsut change names? then do same for next

Then I have edited the quickstatements to be for the other gametype, and on it i have another 1. Team Speech then a 2. What ever i want.

I think this may be possible right. Then just have the fuucking quickresponces as "Visible 0"

demon wouldnt this work eh

edited on May. 24, 2009 05:24 pm by stealthcod2

edited on May. 24, 2009 05:27 pm by stealthcod2

edited on May. 24, 2009 05:31 pm by stealthcod2
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Sunday, May. 24, 2009 10:51 pm
the visible expression can be used to turn menus invisible if a certain condition is met, but they stay usuable. you don't seem the menu, but it's still there and you can click with your mouse etc.

why don't you open the gametype-specific menu via script where it handles the menu responses? it would be like a submenu of course and it may show the same title text in the parent menu but still the best solution i can think of.
Share |
stealthcod2
General Member
Since: Dec 23, 2008
Posts: 108
Last: Jul 13, 2009
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, May. 25, 2009 03:54 am
yeah i understadn but that was just an example. this is question im asking demon, ty for ur help sevenz anywya

Hmmmm, so could I make it so i have only 2 options on wm_quickmessage like on will be for zom and it is the edited quickcommands and then once i push like #1.0 on keyboard then I get a thing where i have 2 another options where its 1. Team Speech 2. What I want. . . Then when i push the team speech i get my 3 speech options. Then for the team chat for second time i would jsut change names? then do same for next

Then I have edited the quickstatements to be for the other gametype, and on it i have another 1. Team Speech then a 2. What ever i want.
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»