|
That causes the "Jump" alias to be executed when th user presses the "S" key. For another example, if you want to bind a chat message to a key, use this: Say "Come get some!" In addition, you can bind multiple actions to a keypress like this, to make the "S" key both jump and say a message. You can also bind an action to the release of a key by using the OnRelease keyword. For example, you can make the "S" key fire when it's released: OnRelease Fire Or you can make the key jump when pressed, and fire when released: Jump | OnRelease Fire Keys can be bound to any of the following kinds of things: Any console command in the above lists. Any key alias (explained below). Any special input command. "Special input command" refers to console commands which only make sense in conjunction with the press or release of a key, or the movement of the mouse or joystick along an axis. The special input commands are: BUTTON « UnrealScript boolean variable name », for example "BUTTON bFire": Maps a button to an UnrealScript variable stored in the Pawn class or any subclass. This tells the input system to automatically set the variable to True when the key is held down, and False when it's not pressed. For example, the Pawn script looks at bFire to tell whether the fire button is being held. The setting of bFire is not some hardcoded behavior of the engine, rather it is propagated into UnrealScript code by the input system, as a result of binding a key to "BUTTON bFire". TOGGLE «UnrealScript boolean variable name», for example "TOGGLE bLook": Like the BUTTON command, but simply tells the input system to toggle the boolean variable's value when the key is pressed. AXIS «UnrealScript floating point variable name» «SPEED=some number», for example "Axis aStrafe Speed=-300.0". Maps an analog input axis movement to an UnrealScript variable, scaling it by some factor. The current axis keys listed in the Advanced Options menu are: MouseX, MouseY, MouseW (Intellimouse wheel), JoyX, JoyY, JoyZ, JoyR (joystick rudder), JoyU, JoyV (joystick alternate axis for example the Panther XL trackball). Supported PlayerPawn axes are aBaseX, aBaseY (base movements which are translated to rotating, strafing, looking, and forward movement based on context), aMouseX, aMouseY, aForward, aTurn, aStrafe, aUp (not used), aLookUp, aExtra0-aExtra4 (not used). To see how the game code processes movement, see the PlayerPawn class's PlayerInput and PlayerTick functions. In addition to the Advance Options menu, you can also bind keys from the console using the following command: SET INPUT SET INPUT X Fire SET INPUT Enter Fire Unreal Tournament Key Aliases Key aliases are listed in Advanced Options / Advanced / Input Aliases. Aliases provide a convenient way to map one word (for example, "Jump") to a complex series of console commands that carry out a particular action. For example, the "Fire" alias is defined as: "Fire | Button bFire". This has the effect of calling the UnrealScript "PlayerPawn.Fire" function (aliases are not recursive), and then causing the input button bJump to be set to True as long as the key is held. |