Gah - a solution with more questions. – EntropicLqd

UE2:LocalMessage (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:10, 22 January 2012 by Rejecht (Talk | contribs) (bFadeMessage - Description)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT2004 Object >> Actor >> Info >> LocalMessage
Package: 
Engine
Direct subclasses:
BulldogMessage, BombTargetMessage, CTFHUDMessage, ChatRoomMessage, ComboMessage, CriticalEventPlus, XDeathMessage, FailedConnect, GameMessage, IdleKickWarningMessage, LMSMessage, Message_ASKillMessages, Message_AssaultTeamRole, Message_Awards, Message_PowerCore, MultiKillMessage, MutantMessage, MutantNameMessage, ONSDaredevilMessage, ONSLinkDesignMessage, ONSVehicleKillMessage, PickupMessagePlus, PlayerNameMessage, SpecialKillMessage, StringMessagePlus, XDomMessage, XKillerMessagePlus, XVictimMessage
Known custom subclasses:
Jrubzjeknf/TeamSpecificActors, Jrubzjeknf/TeamSpecificActors/TeamSpecificLocalMessage
This class in other games:
UT, U2XMP, UE2Runtime, UT2003, U2, UDK, UT3

LocalMessage

LocalMessages are abstract classes which contain an array of localized text. The PlayerController function ReceiveLocalizedMessage() is used to send messages to a specific player by specifying the LocalMessage class and index. This allows the message to be localized on the client side, and saves network bandwidth since the text is not sent. Actors (such as the GameInfo) use one or more LocalMessage classes to send messages. The BroadcastHandler function BroadcastLocalizedMessage() is used to broadcast localized messages to all the players.

Properties[edit]

Property group 'Message'[edit]

bBeep[edit]

Type: bool

If true, beep!

bComplexString[edit]

Type: bool

"Indicates a multicolor string message class."

If bComplexString is set to true, the function RenderComplexMessage gets called each frame.

The RenderComplexMessage function, in conjunction with bComplexString, allows a class to draw to the canvas.

The necessary canvas initializations are done before RenderComplexMessage gets called (font, font size, position, ...).

See the source code for the classes UE2:Message_Awards (UT2004), UE2:SayMessagePlus (UT2004), and UE2:TeamSayMessagePlus (UT2004) for example uses of this feature.

bFadeMessage[edit]

Type: bool

"If true, use fade out effect on message."

Gotcha: If a text string is color coded, the message cannot be faded, unless the color codes were updated within the text string (through RenderComplexString).

bIsConsoleMessage[edit]

Type: bool

If true, put a GetString on the console.

Default value: True

bIsPartiallyUnique[edit]

Type: bool

If true and special, only one can be in the HUD queue with the same switch value

bIsSpecial[edit]

Type: bool

If true, don't add to normal queue.

Default value: True

bIsUnique[edit]

Type: bool

If true and special, only one can be in the HUD queue at a time.

ChildMessage[edit]

Type: class<LocalMessage>

In some cases, we need to refer to a child message.

DrawColor[edit]

Type: Object.Color


Default value:

Member Value
A 255
B 255
G 255
R 255

DrawPivot[edit]

Type: Object.EDrawPivot


Default value: DP_MiddleMiddle

FontSize[edit]

Type: int

0: Huge, 1: Big, 2: Small ...

Lifetime[edit]

Type: int

  1. of seconds to stay in HUD message queue.

Default value: 3

PosX[edit]

Type: float


Default value: 0.5

PosY[edit]

Type: float


Default value: 0.83

StackMode[edit]

Type: EStackMode

Brutal hack!

Enums[edit]

EStackMode[edit]

SM_None 
SM_Up 
SM_Down 

Static functions[edit]

AssembleString[edit]

static function string AssembleString (Hud myHUD, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional string MessageString)


ClientReceive[edit]

static function ClientReceive (PlayerController P, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)


GetColor[edit]

static function Object.Color GetColor (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2)


GetConsoleColor[edit]

static function Object.Color GetConsoleColor (PlayerReplicationInfo RelatedPRI_1)


GetFontSize[edit]

static function int GetFontSize (int Switch, PlayerReplicationInfo RelatedPRI1, PlayerReplicationInfo RelatedPRI2, PlayerReplicationInfo LocalPlayer)


GetLifeTime[edit]

static function float GetLifeTime (int Switch)


GetPos[edit]

static function GetPos (int Switch, out Object.EDrawPivot OutDrawPivot, out EStackMode OutStackMode, out float OutPosX, out float OutPosY)


GetRelatedString[edit]

static function string GetRelatedString (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)


GetString[edit]

static function string GetString (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)


IsConsoleMessage[edit]

static function bool IsConsoleMessage (int Switch)


RenderComplexMessage[edit]

static function RenderComplexMessage (Canvas Canvas, out float XL, out float YL, optional string MessageString, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)

This function gets called each frame if bComplexString is set to true.

The necessary canvas initializations are done before RenderComplexMessage gets called (font, font size, position, ...).

MessageString is the same text string returned from a call to GetString.

XL and YL should be filled out with the width and height of the space occupied by the "message," or whatever is drawn (an icon), so that the next message in a stack of messages, is not drawing over this one.