I don't need to test my programs. I have an error-correcting modem.

UE3:HUD (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> HUD

Contents

Package: 
Engine
Direct subclasses:
DebugCameraHUD, GameHUD, ScoreBoard
This class in other games:
RTNP, U1, UT, U2XMP, UE2Runtime, UT3

HUD: Superclass of the heads-up display.

Properties[edit]

Property group 'HUD'[edit]

bShowBadConnectionAlert[edit]

Type: bool

Display indication of bad connection

ConsoleMessagePosX[edit]

Type: float


ConsoleMessagePosY[edit]

Type: float

DP_LowerLeft

Default value: 0.8

LocalMessages[edit]

Type: HudLocalizedMessage

Array size: 8

Modifiers: transient


Internal variables[edit]

bMessageBeep[edit]

Type: bool

Modifiers: globalconfig

If true, any console messages will make a beep

Default value: True

bShowDebugInfo[edit]

Type: bool

if true, show properties of current ViewTarget

bShowGameDebug[edit]

Type: bool

if true, show gameinfo debug information

bShowHUD[edit]

Type: bool

Modifiers: config

Is the hud visible

Default value: True

bShowOverlays[edit]

Type: bool

If true, render actor overlays

bShowScores[edit]

Type: bool

Is the Scoreboard visible

Canvas[edit]

Type: Canvas

Canvas to Draw HUD on. NOTE: a new Canvas is given every frame, only draw on it from the HUD::PostRender() event

CenterX[edit]

Type: float

Modifiers: transient

Center of Viewport

CenterY[edit]

Type: float

Modifiers: transient

Center of Viewport

ConsoleColor[edit]

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 253
G 216
R 153

ConsoleFontSize[edit]

Type: int

Modifiers: globalconfig


Default value: 5

ConsoleMessageCount[edit]

Type: int

Modifiers: globalconfig


Default value: 4

ConsoleMessages[edit]

Type: array<ConsoleMessage>


DebugDisplay[edit]

Type: array<name>

Modifiers: globalconfig


Default value: 'AI'

GreenColor[edit]

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 0
G 255
R 0

HudCanvasScale[edit]

Type: float

Modifiers: globalconfig

Specifies amount of screen-space to use (for TV's).

Default value: 0.95

HudOwner[edit]

Type: HUD

Used for sub-huds like the scoreboard

KismetTextInfo[edit]

Type: array<KismetDrawTextInfo>


LastHUDRenderTime[edit]

Type: float

Modifiers: transient

Used to create DeltaTime

LostFocusPaused[edit]

Type: bool

Modifiers: transient

Tells whether the game was paused due to lost focus

MaxHUDAreaMessageCount[edit]

Type: int


Default value: 3

MessageFontOffset[edit]

Type: int

Modifiers: globalconfig


PlayerOwner[edit]

Type: PlayerController

always the actual owner

PostRenderedActors[edit]

Type: array<Actor>

Holds a list of Actors that need PostRender calls

RatioX[edit]

Type: float

Modifiers: transient

Ratio of viewport compared to native resolution 1024x768

RatioY[edit]

Type: float

Modifiers: transient

Ratio of viewport compared to native resolution 1024x768

RedColor[edit]

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 0
G 0
R 255

RenderDelta[edit]

Type: float

Modifiers: transient

Time since last render

Scoreboard[edit]

Type: ScoreBoard


SizeX[edit]

Type: float

Modifiers: transient

Size of ViewPort in pixels

SizeY[edit]

Type: float

Modifiers: transient

Size of ViewPort in pixels

ViewedInfo[edit]

Type: PlayerReplicationInfo

The PRI of the current view target

WhiteColor[edit]

Type: Object.Color

Modifiers: const


Default value:

Member Value
A 255
B 255
G 255
R 255

Default values[edit]

Property Value
bHidden True
CollisionType COLLIDE_CustomDefault
TickGroup TG_DuringAsyncWork

Structs[edit]

ConsoleMessage[edit]

Modifiers: native

string Text 
Object.Color TextColor 
float MessageLife 
PlayerReplicationInfo PRI 

HudLocalizedMessage[edit]

Modifiers: native

class<LocalMessage> Message 
string StringMessage 
int Switch 
float EndOfLife 
float Lifetime 
float PosY 
Object.Color DrawColor 
int FontSize 
Font StringFont 
float DX 
float DY 
bool Drawn 
int Count 
Object OptionalObject 

KismetDrawTextInfo[edit]

Modifiers: native

string MessageText 
Font MessageFont 
Object.Vector2D MessageFontScale 
Object.Vector2D MessageOffset 
Object.Color MessageColor 
float MessageEndTime 

Functions[edit]

Static functions[edit]

GetFontSizeIndex[edit]

static function Font GetFontSizeIndex (int FontSize)


GetRYGColorRamp[edit]

static function Object.Color GetRYGColorRamp (float Pct)


Exec functions[edit]

FXPlay[edit]

exec function FXPlay (class<PawnaClass, string FXAnimPath)

Finds the nearest pawn of the given class (excluding the owner's pawn) and plays the specified FaceFX animation.

FXStop[edit]

exec function FXStop (class<PawnaClass)

Finds the nearest pawn of the given class (excluding the owner's pawn) and stops any currently playing FaceFX animation.

SetShowScores[edit]

exec function SetShowScores (bool bNewValue)

sets bShowScores to a specific value (not toggle)

ShowDebug[edit]

exec function ShowDebug (optional name DebugType)


ShowGameDebug[edit]

exec function ShowGameDebug ()


ShowHUD[edit]

exec function ShowHUD ()


ShowScores[edit]

exec function ShowScores ()


ToggleHUD[edit]

exec function ToggleHUD ()


Native functions[edit]

Draw2DLine[edit]

native final function Draw2DLine (int X1, int Y1, int X2, int Y2, Object.Color LineColor)


Draw3DLine[edit]

native final function Draw3DLine (Object.Vector Start, Object.Vector End, Object.Color LineColor)


DrawActorOverlays[edit]

native function DrawActorOverlays (Object.Vector Viewpoint, Object.Rotator ViewRotation)


Events[edit]

Destroyed[edit]

event Destroyed ()

Overrides: Actor.Destroyed


OnLostFocusPause[edit]

event OnLostFocusPause (bool Enable)

Pauses or unpauses the game due to main window's focus being lost.

Parameters:

  • Enable - tells whether to enable or disable the pause state

PostBeginPlay[edit]

event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


PostRender[edit]

event PostRender ()

PostRender is the main draw loop.

Other instance functions[edit]

AddConsoleMessage[edit]

function AddConsoleMessage (string M, class<LocalMessageInMessageClass, PlayerReplicationInfo PRI, optional float LifeTime)

Add a new console message to display.

AddLocalizedMessage[edit]

function AddLocalizedMessage (int Index, class<LocalMessageInMessageClass, string CriticalString, int Switch, float Position, float LifeTime, int FontSize, Object.Color DrawColor, optional int MessageCount, optional Object OptionalObject)

Add the actual message to the array. Made easier to tweak in a subclass

Parameters:

  • Index - The index in to the LocalMessages array to place it.
  • InMessageClass - Class of the message
  • CriticialString - String of the message
  • Switch - The message switch
  • Position - Where on the screen is the message
  • LifeTime - How long does this message live
  • FontSize - How big is the message
  • DrawColor - The Color of the message

AddPostRenderedActor[edit]

function AddPostRenderedActor (Actor A)

AddPostRenderedActor() add an actor to the PostRenderedActors array

ClearMessage[edit]

function ClearMessage (out HudLocalizedMessage M)


DisplayBadConnectionAlert[edit]

function DisplayBadConnectionAlert ()


DisplayConsoleMessages[edit]

function DisplayConsoleMessages ()

Display current messages

DisplayKismetMessages[edit]

function DisplayKismetMessages ()


DisplayLocalMessages[edit]

function DisplayLocalMessages ()


DrawDemoHUD[edit]

function DrawDemoHUD ()

Called instead of DrawHUD() if bShowHUD==false

DrawEngineHUD[edit]

function DrawEngineHUD ()

Special HUD for Engine demo

DrawHUD[edit]

function DrawHUD ()

The Main Draw loop for the hud. Gets called before any messaging. Should be subclassed

DrawMessage[edit]

function DrawMessage (int i, float PosY, out float DX, out float DY)


DrawMessageText[edit]

function DrawMessageText (HudLocalizedMessage LocalMessage, float ScreenX, float ScreenY)


DrawRoute[edit]

function DrawRoute (Pawn Target)


GetScreenCoords[edit]

function GetScreenCoords (float PosY, out float ScreenX, out float ScreenY, out HudLocalizedMessage InMessage)


LocalizedMessage[edit]

function LocalizedMessage (class<LocalMessageInMessageClass, PlayerReplicationInfo RelatedPRI_1, string CriticalString, int Switch, float Position, float LifeTime, int FontSize, Object.Color DrawColor, optional Object OptionalObject)


Message[edit]

function Message (PlayerReplicationInfo PRI, coerce string Msg, name MsgType, optional float LifeTime)


PlayerOwnerDied[edit]

function PlayerOwnerDied ()

Called when the player owner has died.

PreCalcValues[edit]

function PreCalcValues ()

Pre-Calculate most common values, to avoid doing 1200 times the same operations

RemovePostRenderedActor[edit]

function RemovePostRenderedActor (Actor A)

RemovePostRenderedActor() remove an actor from the PostRenderedActors array

ShouldDisplayDebug[edit]

function bool ShouldDisplayDebug (name DebugType)


SpawnScoreBoard[edit]

function SpawnScoreBoard (class<ScoreBoardScoringType)