Mostly Harmless

User:Crusha/UltimateMappingTools/CountdownEventGate

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

CountdownEventGate

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> CountdownEventGate (custom)
Package: 
UltimateMappingTools

Waits a certain time before triggering the next Event. The condition mustn't be untriggered in that time, or the countdown stops. There is a ToleranceTime in which the event can be triggered again to continue the current countdown.

Properties

Property group 'CountdownEventGate'

bBroadcastCountdown

Type: bool

Countdown will be broadcasted to the HUD.

Default value: True

bLoopCountdown

Type: bool

Triggers the Event all CountdownTime seconds until this gets untriggered.

BlueTeamMessages

Type: TeamMessage

Specific countdown messages for the blue team.

bNoUntrigger

Type: bool

This will only trigger an event but never untrigger it.

bSubtileCounting

Type: bool

If True, the timer will only appear in certain intervals. Otherwise it's always visible when the countdown is active.

bSwitchMessageTeamsAfterReset

Type: bool

Use all RedTeamMessages on the blue team in swapped rounds and the other way around.

Default value: True

CountdownPosX

Type: float

The relative location of the countdown in the HUD.

CountdownPosY

Type: float

Only the countdown - not the messages.

CountdownString

Type: string

Modifiers: localized

Displayed with the countdown. %c in the string will be replaced with a numerical representation of the countdown.

CountdownTime

Type: float

Wait for the CountdownTime before triggering the Event.

The Event will not get triggered if a part of the condition becomes False during the countdown. 0 disables this, but makes no sense.

Default value: 60.0

MessageType

Type: EMT_MessageType

The place and font for all messages to use.

Default value: EMT_CriticalEvent

RedTeamMessages

Type: TeamMessage

Specific countdown messages for the red team.

ScoreFontSize

Type: int

This int size controls how big the font is at different resolutions. -2 is normally quite good.

ToleranceTime

Type: float

If the whole condition gets False after being true, then you have this much time to get it True again to keep your CountdownTime progress. Otherwise you start over again. 0 disables this.

Property group 'Events'

CountdownStoppedEvent

Type: name

This will be triggered when the condition gets untriggered. You can use it to do something when the ToleranceTime starts.

ToleranceStoppedEvent

Type: name

This will be triggered when the condition gets triggered while the gate is in ToleranceTime.

Internal variables

BlueTeam

Type: byte

For Reset()

bMainCountdown

Type: bool

Do the main thing, not the tolerance.

bWasTolerance

Type: bool

Whether this actor was just in Tolerance, so write the ToleranceAbort-Msg.

CountdownProgress

Type: float

Saves the last CountdownTime for later re-use.

CountdownProgressInt

Type: int

Typecast it once to save performance.

MSGType

Type: name


RedTeam

Type: byte

For Reset()

TempInstigator

Type: Pawn

Remember, because of a gap to the next TriggerEvent.

ToleranceProgress

Type: float


Default values

Property Value
NetUpdateFrequency 2.0
RemoteRole Role_SimulatedProxy

Enums

EMT_MessageType

EMT_Default 
Comment in chat window.
EMT_CriticalEvent 
Big font on the center of the screen.
EMT_DeathMessage 
Small in chat window.
EMT_Say 
Small in chat window.
EMT_TeamSay 
Small in chat window.

Structs

TeamMessage

string MsgCountdownStart 
Message to display when the Countdown starts.
string MsgCountdownSuccess 
Message to display when the Countdown runs out.
string MsgCountdownAbort 
Message to display when the Countdown is aborted in time.
string MsgToleranceSuccess 
Message to display when the ToleranceTime runs out.
string MsgToleranceAbort 
Message to display when this is retriggered in the ToleranceTime.

Functions

Events

BeginPlay

event BeginPlay ()

Overrides: Actor.BeginPlay


PostBeginPlay

event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


SetInitialState

event SetInitialState ()

Overrides: Actor.SetInitialState


Other instance functions

DisplayHUDMessage

function DisplayHUDMessage (string Message, byte TeamNum)


Reset

function Reset ()

Overrides: Actor.Reset


States

ClientTick

ClientTick.Tick

simulated event Tick (float DeltaTime)

Overrides: Actor.Tick (global)


ServerTick

ServerTick.Tick

event Tick (float DeltaTime)

Overrides: Actor.Tick (global)


ServerTick.Trigger

event Trigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.Trigger (global)


ServerTick.UnTrigger

event UnTrigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.UnTrigger (global)



CountdownHUDOverlay

by Crusha K. Rool

UT2004 Object >> Actor >> HudOverlay >> CountdownHUDOverlay (custom)
Package: 
UltimateMappingTools

Allows to specify a custom position to display the countdown in the HUD.

Properties

CountdownProgressInt

Type: int

Typecasted version of the countdown since floating points would be too confusing.

ParentCountdown

Type: CountdownEventGate

The CountdownEventGate that we watch.

PCOwner

Type: PlayerController

The PlayerController that owns this HUD.

ScoreFontSize

Type: int

The font size we will be using.

Instance functions

DisplayCountdown

function DisplayCountdown (Canvas C)


Render

function Render (Canvas C)

Overrides: HudOverlay.Render