This is just a basic explanation of how the Quick Chat Menu works not how to modify it.
It all starts with this file: raw\ui_mp\wm_quickmessage.menu
This file is what displays the text for the Quick Chat Menu and gives the player 3 choices to choose from; each of these choices executes a set of commands(functions) to close the Quick Chat Menu and run(load) corresponding menu files.
Let's have a quick look at some snippets from this file.
For Quick Commands (choice 1):
Code: Select all
execkey "1" { close quickmessage; open quickcommands }
For Quick Statements (choice 2):
Code: Select all
execkey "2" { close quickmessage; open quickstatements }
For Quick Responses (choice 3):
Code: Select all
execkey "3" { close quickmessage; open quickresponses }
As you can see Each of these choices opens the corresponding menu file.
raw\ui_mp\scriptmenus\quickcommands.menu
raw\ui_mp\scriptmenus\quickstatements.menu
raw\ui_mp\scriptmenus\quickresponses.menu
These menu files contain code to display Menu specific Text, and gives the player 1 of (up to) 8 menu specific choices. Each of these choices executes a set of commands(functions) to set a menu specific scriptMenuResponse and close the menu.
Let's Have a quick look at a snippet from one of these files.
For raw\ui_mp\scriptmenus\quickcommands.menu
Code: Select all
execkey "1" { scriptMenuResponse "1"; close quickcommands; }
This scriptMenuResponse of "1" is passed to the raw\maps\mp\gametypes\_quickmessages.gsc where the quick command choice "1" will be run thru it's script.
Now let's look at a snippet from the raw\maps\mp\gametypes\_quickmessages.gsc to see what "1" it actually does.
For Quick Commands
We will look for quickcommands(response) within the _quickmessages.gsc because that is the menu we are following in the above code.
Code: Select all
quickcommands(response)
{
self endon ( "disconnect" );
if(!isdefined(self.pers["team"]) || self.pers["team"] == "spectator" || isdefined(self.spamdelay))
return;
self.spamdelay = true;
switch(response)
{
case "1":
soundalias = "mp_cmd_followme";
saytext = &"QUICKMESSAGE_FOLLOW_ME";
break;
.
.
.
}
self saveHeadIcon();
self doQuickMessage(soundalias, saytext);
wait 2;
self.spamdelay = undefined;
self restoreHeadIcon();
}
but the party is not over,
the command
Code: Select all
self doQuickMessage(soundalias, saytext);
The _quickmessages.gsc is where all the good stuff happens, where the sound is called and played; where text is actually written on screen for players to read, and has many other usefull capabilites.