I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Legacy:Console

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 18:47, 31 October 2007 by Cpe-76-185-117-223.tx.res.rr.com (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT :: Object (UT) >> Console (Package: Engine)

or

UT2003 :: Object >> Interactions >> Interaction >> Console (Package: Engine)

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[edit]

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[edit]

You might be looking for...

Requests[edit]

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.

Jediborg: Does anybody know how to write text to the console via a script? I know you can write to the utlog file, but that sucks. Surely there is a way to get real-time debugging info?