My program doesn't have bugs. It just develops random features.

UE3:Interaction (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
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[edit]

Property Value
OnInitialize Initialized

Delegates[edit]

OnInitialize[edit]

delegate OnInitialize ()

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

OnReceivedNativeInputAxis[edit]

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

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

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

Native functions[edit]

Init[edit]

native final noexport function Init ()

Called when the interaction is added to the GlobalInteractions array.

Events[edit]

PostRender[edit]

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

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

Initialized[edit]

function Initialized ()

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

NotifyGameSessionEnded[edit]

function NotifyGameSessionEnded ()

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

NotifyPlayerAdded[edit]

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

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