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

UE3:Interaction (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 04:04, 26 July 2008 by (Talk)

Jump to: navigation, search
UT3 Object >> UIRoot >> Interaction
Package: 
Engine
Direct subclasses:
PlayerManagerInteraction, UIInteraction, Console, DemoKismetInputInteraction, Input, UTQueryHelper
This class in other games:
UE2Runtime, UT2003, UT2004, UDK

Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Default values

Property Value
OnInitialize Initialized

Delegates

OnInitialize

delegate OnInitialize ()

Called from native Init() after native initialization has been performed.

OnReceivedNativeInputAxis

delegate bool OnReceivedNativeInputAxis (int ControllerId, name Key, float Delta, float DeltaTime, optional bool bGamepad)

Provides script-only child classes the opportunity to handle input axis events received from the viewport. This delegate is ONLY called when input is being routed natively from the GameViewportClient (i.e. NOT when unrealscript calls the InputKey native unrealscript function on this Interaction).

Parameters:

  • ControllerId - the controller that generated this input axis event
  • Key - the name of the axis that moved (KEY_MouseX, KEY_XboxTypeS_LeftX, etc.)
  • Delta - the movement delta for the axis
  • DeltaTime - the time (in seconds) since the last axis update.
  • bGamepad - input came from gamepad (ie xbox controller)

Returns:

return TRUE to indicate that the input event was handled. if the return value is TRUE, the input event will not be processed by this Interaction's native code.

OnReceivedNativeInputChar

delegate bool OnReceivedNativeInputChar (int ControllerId, string Unicode)

Provides script-only child classes the opportunity to handle character input (typing) events received from the viewport. This delegate is ONLY called when input is being routed natively from the GameViewportClient (i.e. NOT when unrealscript calls the InputKey native unrealscript function on this Interaction).

Parameters:

  • ControllerId - the controller that generated this character input event
  • Unicode - the character that was typed

Returns:

return TRUE to indicate that the input event was handled. if the return value is TRUE, the input event will not be processed by this Interaction's native code.

OnReceivedNativeInputKey

delegate bool OnReceivedNativeInputKey (int ControllerId, name Key, Object.EInputEvent EventType, optional float AmountDepressed, optional bool bGamepad)

Provides script-only child classes the opportunity to handle input key events received from the viewport. This delegate is ONLY called when input is being routed natively from the GameViewportClient (i.e. NOT when unrealscript calls the InputKey native unrealscript function on this Interaction).

Parameters:

  • ControllerId - the controller that generated this input key event
  • Key - the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
  • EventType - the type of event which occured (pressed, released, etc.)
  • AmountDepressed - for analog keys, the depression percent.
  • bGamepad - input came from gamepad (ie xbox controller)

Returns:

return TRUE to indicate that the input event was handled. if the return value is TRUE, the input event will not be processed by this Interaction's native code.

Functions

Native functions

Init

native final noexport function Init ()

Called when the interaction is added to the GlobalInteractions array.

Events

PostRender

event PostRender (Canvas Canvas)

Called once a frame to allow the interaction to draw to the canvas

Parameters:

  • Canvas - Canvas object to draw to

Tick

event Tick (float DeltaTime)

Called once a frame to update the interaction's state.

Parameters:

  • DeltaTime - The time since the last frame.

Other instance functions

Initialized

function Initialized ()

default handler for OnInitialize delegate. Here so that child classes can override the default behavior easily

NotifyGameSessionEnded

function NotifyGameSessionEnded ()

Called when the current map is being unloaded. Cleans up any references which would prevent garbage collection.

NotifyPlayerAdded

function NotifyPlayerAdded (int PlayerIndex, LocalPlayer AddedPlayer)

Called when a new player has been added to the list of active players (i.e. split-screen join)

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] where the player was inserted
  • AddedPlayer - the player that was added

NotifyPlayerRemoved

function NotifyPlayerRemoved (int PlayerIndex, LocalPlayer RemovedPlayer)

Called when a player has been removed from the list of active players (i.e. split-screen players)

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] where the player was located
  • RemovedPlayer - the player that was removed