HUD & UI

One widget, a set of update functions, and animated bars and icon rows that need almost no wiring.

๐Ÿ“Š12 update hooks
โฑ๏ธ10 min read
๐ŸŽž๏ธAnimated bars
๐Ÿ”ขFloating numbers
ASKHUD ยท USKHUDWidget ยท USKResourceBarWidget ยท USKHUDItemWidget

The HUD is one widget with a set of update functions. The kit calls them when something changes โ€” you override the ones you care about and lay out the visuals however you like. Nothing is hard-coded to a particular design, and any function you don't override simply does nothing.

Setting it up

1

Create the widget

New Widget Blueprint, and reparent it to SKHUDWidget (File โ†’ Reparent Blueprint). Lay out your score text, bars and lives row on the canvas.

2

Assign it

On BP_GameMode, the HUD class is SKHUD. Set its HUD Widget Class to your widget. It is created and shown automatically.

3

Override what you need

In the widget's Functions โ†’ Override panel, add the update functions below. They are functions, not event-graph events โ€” look in the Override dropdown, not the graph.

Update functions

FunctionCalled when
Update ScoreThe run score changes.
Update CurrencyThe currency total changes.
Update LivesLives are gained or lost.
Update HealthPlayer health changes. Supplies current, max and percentage.
Update ShieldShield points change.
Update EnergyThe energy generator changes.
Update AmmoAn ammo weapon's supply changes. Supplies the mount slot, so you can show a separate readout per gun.
Update Boss HealthThe active boss takes damage.
Set Boss Bar VisibleA boss fight starts or ends.
Show Game OverThe player runs out of lives.
Show Stage ClearA stage is cleared, just before the transition.
Show VictoryThe final stage is cleared โ€” the run is won.
Each resource function receives the percentage alongside the raw numbers, so driving a bar needs no arithmetic in Blueprint. Pass the percentage straight to a resource bar.

Resource bars

USKResourceBarWidget

An animated two-layer bar. Losing value snaps the main bar to the truth immediately while a ghost layer holds, then drains after it โ€” so the player sees exactly how much they just lost. Gains climb smoothly, which hides the chunky per-point regeneration that shields use.

It is entirely optional. A plain Progress Bar driven from the same update function works fine.

Setup

Create a Widget Blueprint reparented to SKResourceBarWidget containing an Overlay with two Progress Bars. The names must match exactly:

Widget namePositionRequired
GhostBarFirst child โ€” underneathOptional. Omit it for a plain bar.
BarSecond child โ€” on topRequired.

Then drive it with a single node: Set Percent, from the matching HUD update function.

Properties

PropertyDefaultPurpose
Ghost Hold Time0.35Seconds the ghost layer waits before draining.
Ghost Drain Speed3How fast it then catches up.
Smooth GainsOnClimb smoothly on gain rather than snapping.
Auto HideOffFade the bar out when it has been full and idle.
Auto Hide Delay2Seconds of inactivity before fading.
Full Show Time1.5How long it stays visible after reaching full.
Auto Hide Fade Speed4Fade rate.
Reveal Below Percent0Force the bar visible below this fraction, so a hidden bar reappears when it matters.
Auto Pill CornersOffRounds the bar's corners to a pill automatically.
Snap To Percentโ€”Function. Jumps to a value with no animation โ€” use on respawn so the bar doesn't animate a refill.
Colours are set through the bar's own Fill, Ghost and Empty colour properties, which are applied automatically. The internal progress bars need no hand-styling, and styling them directly is unnecessary. Tints multiply the brush, so custom rounded or bordered bar images work โ€” a baked border belongs on the background brush rather than the fill.

Icon rows: lives and stock

USKHUDItemWidget

For a row of life icons, the whole job is one node. From your Update Lives override, call Sync Child Count with the panel, the item widget class and the new count. It adds and removes icons for you, animating each one in or out.

// Update Lives override โ€” the entire implementation Sync Child Count( Panel = LifeHolder, Item Class = WBP_LifeIcon, Count = NewLives )

Create the icon as a Widget Blueprint reparented to SKHUDItemWidget. It handles its own entrance and exit.

Two animation modes

ModeHow
ProceduralOn by default. Code-driven motion with per-item randomisation โ€” new icons pop in with overshoot, lost ones launch, tumble, fall and squash out. Nothing to author.
AuthoredAdd UMG animations named exactly IntroAnim and OutroAnim. Both optional.

Procedural tuning

PropertyDefaultPurpose
Eject StyleTumbleHow a lost icon leaves โ€” tumbling, or as a comet.
Squash ModeArea PreservingArea-preserving squash looks physical; pure stretch is more cartoon-like.
Launch Angle / Spread0 / 30Direction the icon is thrown, and its random variation.
Launch Speed300โ€“500Random speed range.
Gravity1600How hard it falls.
Spin Speed90โ€“360Random tumble rate.
Squash Per Speed / Max Stretch0.0009 / 0.6How much speed distorts the icon, and the cap.
Duration0.9Seconds the exit takes.
Scale Out Start0.55Fraction of the exit at which it starts shrinking away.
Overshoot / Drop In Offset0.7 / 0,-28Entrance bounce and the offset it drops in from.
Spawn Angle Jitter8Random tilt on arrival, so a row doesn't look stamped.
The container must not have Clip to Bounds enabled, or icons flying out will be clipped at the panel edge. Retiring icons are automatically lifted onto a full-screen layer so the row reflows immediately and the icon can fall off screen โ€” you never author that layer yourself.

Floating bars over enemies

USKFloatingBarComponent

Add this to any pawn for a small bar that follows it in screen space. Useful for enemy health, boss health or a shield readout.

PropertyDefaultPurpose
Bar Widgetโ€”The resource-bar widget class to display.
ResourceHealthWhich resource it tracks โ€” health, shield or energy.
Bar Size120 ร— 14Size in screen pixels.
Auto HideOnHide when full and idle, so a screen of healthy enemies isn't cluttered with bars.
Auto Hide Delay2Seconds before hiding.
Reveal Below Percent0Always show below this fraction.
Z Order0Draw order against other HUD elements.

Floating bars hide automatically while the player is dead, so they don't linger through the respawn delay.

Floating numbers

Damage numbers pop above whatever was hit, rise and fade. The carrier actor is pooled, so a busy screen costs nothing extra.

SettingWherePurpose
Show Damage NumbersGame modeMaster toggle.
Damage Number Widget ClassGame modeThe styled widget to pop.
DurationWidgetSeconds on screen. Default 0.8.
Rise PixelsWidgetHow far it floats up. Default 60.
Pop OvershootWidgetScale bounce on appearing. Default 1.3.

The same machinery drives any floating number. Call Show Floating Number on the game mode with your own widget class to pop currency values, combo counts or pickup names โ€” it is not limited to damage, and it ignores the damage-number toggle so a currency popper can't be switched off by accident.

Common fixes

  • Nothing updates โ€” the widget isn't reparented to SKHUDWidget, or the HUD class has no widget assigned
  • The override isn't in the event graph โ€” these are functions; use Functions โ†’ Override
  • Life icons vanish at the panel edge instead of flying off โ€” turn off Clip to Bounds on the container
  • The ghost layer never shows โ€” the bar has no child named exactly GhostBar, or it isn't the first child
  • Bars animate a refill on respawn โ€” use Snap To Percent instead of Set Percent

Where next

Resources

The events that drive these bars.

Read โ†’

Progression

Score, lives and high scores.

Read โ†’

Bosses

What drives the boss bar.

Read โ†’