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

Members Online

»
0 Active | 78 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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
Next Page
subscribe
Author Topic: Different .menus for diff gametype
stealthcod2
General Member
Since: Dec 23, 2008
Posts: 108
Last: Jul 13, 2009
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, May. 22, 2009 09:26 pm
Is this possible? Like I wanna have like an added option to the quickchat for like lets say zom, but for a different gametype I want a different .menu. So i am combiind these 2 gametpes in 1 .iwd but how do i do, is it possibles?

\\Stealth
Share |
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: Friday, May. 22, 2009 09:38 pm
Yes, its possible. Simply make your new quickchat menus, and add them to the top of this file:

maps/mp/gametypes/_quickmessages.gsc

Add them like this:

Code:
init()
{
	if(getcvar( "g_gametype" ) == "zombies" )
	{
	        game["menu_quickcommands"] = "yourcustommenu";
		game["menu_quickstatements"] = "yourcustommenu";
		game["menu_quickresponses"] = "yourcustommenu";
	}
	else
	{
		game["menu_quickcommands"] = "quickcommands";
		game["menu_quickstatements"] = "quickstatements";
		game["menu_quickresponses"] = "quickresponses";
	}

	precacheMenu(game["menu_quickcommands"]);
	precacheMenu(game["menu_quickstatements"]);
	precacheMenu(game["menu_quickresponses"]);
	precacheHeadIcon("talkingicon");
}


You get the idea.

edited on May. 22, 2009 05:39 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: Friday, May. 22, 2009 09:46 pm
yupperzz ty,
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 05:59 am
This aint working well, because i want 2 _quickmessages
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 07:51 am
two quickmessage menus at the same time or only one of both depending on the gametype?

Share |
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 09:03 am
stealthcod2 writes...
Quote:
This aint working well, because i want 2 _quickmessages


Ive shown you how to have as many different versions of quickmessage menus, but you cant have 2 quickmesage menus open at the same time, as the game engine will only work with one. There is internal code which opens the quickmessage menu with a keyboard stroke. As there is no way to get at that engine code, you are pretty much left with just the one.
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 04:33 pm
Sevenz writes...
Quote:
two quickmessage menus at the same time or only one of both depending on the gametype?



Ya, i want want one _quickmessages for one game type, one fror the other.
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 04:45 pm
Like in the ui_mp I have a wm_quicmessages.menu for one gametype and then a zom_wm_quickmessages.menu for the other, just dunno how to call like one for one other for the other.
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 04:45 pm
Like in the ui_mp I have a wm_quicmessages.menu for one gametype and then a zom_wm_quickmessages.menu for the other, just dunno how to call like one for one other for the other.
Share |
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 06:07 pm
Ok, I can see where you are getting confused now -

wm_quickmessages.menu is a pop-up menu. It actually opens 3 other menus: quickcommands.menu, quickstatements.menu, and quickresponses.menu. So those are the ones you can customise, and you dont have to touch wm_quickmessages.menu (it will automatically open the right menu as long as it is defined).

The stock ones are in:

iw_06.iwd/ui_mp/scriptmenus/quickcommands.menu
iw_06.iwd/ui_mp/scriptmenus/quickstatements.menu
iw_06.iwd/ui_mp/scriptmenus/quickresponses.menu

Pull them out and go through each one and edit them according to what commands, statements and responses you want for the zombie gametype.

Then rename each one with the prefix zom_:

zom_quickcommands.menu
zom_quickstatements.menu
zom_quickstatements.menu

Then edit _quickmessages.gsc (iw_07.iwd/maps/mp/gametypes/_quickmessages.gsc). You can either keep a single GSC file, adding in your own methods, or rename _quickmessages.gsc to something like _zom_quickmessages.gsc.

I'll assume you want to create a new _zom_quickmessages. So, now add the menus to the top of your _zom_quickmessages.gsc:

Code:
init()
{

	game["menu_quickcommands"] = "zom_quickcommands";
	game["menu_quickstatements"] = "zom_quickstatements";
	game["menu_quickresponses"] = "zom_quickresponses";


	precacheMenu(game["menu_quickcommands"]);
	precacheMenu(game["menu_quickstatements"]);
	precacheMenu(game["menu_quickresponses"]);
	precacheHeadIcon("talkingicon");
}


You will now have to edit _menus.gsc (iw_07.iwd/maps/mp/gametypes/_menus.gsc):

Code:
		else if(!level.xenon)
		{
			if( getcvar( "g_gametype" ) == "zom" )
			{
				if(menu == game["menu_quickcommands"])
					maps\mp\gametypes\_zom_quickmessages::quickcommands(response);
				else if(menu == game["menu_quickstatements"])
					maps\mp\gametypes\_zom_quickmessages::quickstatements(response);
				else if(menu == game["menu_quickresponses"])
					maps\mp\gametypes\_zom_quickmessages::quickresponses(response);			
			}
			else
			{
				if(menu == game["menu_quickcommands"])
					maps\mp\gametypes\_quickmessages::quickcommands(response);
				else if(menu == game["menu_quickstatements"])
					maps\mp\gametypes\_quickmessages::quickstatements(response);
				else if(menu == game["menu_quickresponses"])
					maps\mp\gametypes\_quickmessages::quickresponses(response);
			}
		}


Now, you have different quickmessage menus for different gametypes. When you press the key bound to open the pop-up wm_quickmessages.menu, it will open the right menu for the right gametype.




edited on May. 24, 2009 02:09 pm by DemonSeed
Share |
Restricted Access Topic is Locked
Page
Next 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

»