Console
or
Console is the user interface for the Unreal engine that accompanies a Viewport. The UT generation of the Unreal engine introduced an enhanced, Windows-style console, WindowConsole. In later engine builds any Interaction subclass can serve as console, but the default console in UT2003 is ExtendedConsole?.
Technical Notes
The Key that brings up the console is defined in the game .ini file. For example, in UE2Runtime.ini:
[Engine.Console] ConsoleKey=192
In UnrealEngine2 Runtime this is (obviously) linked to the following config variable:
var globalconfig byte ConsoleKey; // Key used to bring up the console
In UT2003 it's called ConsoleHotKey instead, but essentially the same configuration.
Sticking with Runtime for the moment, we continue:
When you press the ConsoleKey to bring up the console during a game, the Console class goes into the Typing state. The defualt KeyEvent() function waits for the key to be pressed, and if it has, executes the state change. Once in Typing, the relevant KeyEvent() function responds to:
- Escape key (IK_Escape) to cancel the console input
- Backspace (IK_Backspace) for obvious reasons
- Up and Down keys (IK_Up, IK_Down) to navigate the command history (in an array of strings called History).
- Enter (IK_Enter) adds the command just typed to History and then tries to execute the command (via native function ConsoleCommand())
The KeyType function appends characters to TypedStr, eventually holding the new command. It filters out any characters that are not valid.
In UT2003, ExtendedConsole? does not make use of the Typing state at all - the ConsoleVisible state takes over its functions, and offers a few extra ones. ExtendedConsole? also handles the Speech menu.
Other topics
You might be looking for...
- UnrealEd Console commands
- The Console bar in the UnrealEd interface
- UT2003 Console commands
- UT Console commands
Requests
Bob242: Does anybody have any information on the new things that ExtendedConsole? handles? Incidentally, if someone wanted the Server to take a look at a client console's history everytime there is a change, would that be easy to acomplish? I assume that you would need something on the client end to send it to the server upon a change.