HUD & UI
One widget, a set of update functions, and animated bars and icon rows that need almost no wiring.
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
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.
Assign it
On BP_GameMode, the HUD class is SKHUD. Set its
HUD Widget Class to your widget. It is created and shown automatically.
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
| Function | Called when |
|---|---|
| Update Score | The run score changes. |
| Update Currency | The currency total changes. |
| Update Lives | Lives are gained or lost. |
| Update Health | Player health changes. Supplies current, max and percentage. |
| Update Shield | Shield points change. |
| Update Energy | The energy generator changes. |
| Update Ammo | An ammo weapon's supply changes. Supplies the mount slot, so you can show a separate readout per gun. |
| Update Boss Health | The active boss takes damage. |
| Set Boss Bar Visible | A boss fight starts or ends. |
| Show Game Over | The player runs out of lives. |
| Show Stage Clear | A stage is cleared, just before the transition. |
| Show Victory | The final stage is cleared โ the run is won. |
Resource bars
USKResourceBarWidgetAn 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 name | Position | Required |
|---|---|---|
| GhostBar | First child โ underneath | Optional. Omit it for a plain bar. |
| Bar | Second child โ on top | Required. |
Then drive it with a single node: Set Percent, from the matching HUD update function.
Properties
| Property | Default | Purpose |
|---|---|---|
| Ghost Hold Time | 0.35 | Seconds the ghost layer waits before draining. |
| Ghost Drain Speed | 3 | How fast it then catches up. |
| Smooth Gains | On | Climb smoothly on gain rather than snapping. |
| Auto Hide | Off | Fade the bar out when it has been full and idle. |
| Auto Hide Delay | 2 | Seconds of inactivity before fading. |
| Full Show Time | 1.5 | How long it stays visible after reaching full. |
| Auto Hide Fade Speed | 4 | Fade rate. |
| Reveal Below Percent | 0 | Force the bar visible below this fraction, so a hidden bar reappears when it matters. |
| Auto Pill Corners | Off | Rounds 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. |
Icon rows: lives and stock
USKHUDItemWidgetFor 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.
Create the icon as a Widget Blueprint reparented to SKHUDItemWidget. It handles its own
entrance and exit.
Two animation modes
| Mode | How |
|---|---|
| Procedural | On 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. |
| Authored | Add UMG animations named exactly IntroAnim and OutroAnim. Both optional. |
Procedural tuning
| Property | Default | Purpose |
|---|---|---|
| Eject Style | Tumble | How a lost icon leaves โ tumbling, or as a comet. |
| Squash Mode | Area Preserving | Area-preserving squash looks physical; pure stretch is more cartoon-like. |
| Launch Angle / Spread | 0 / 30 | Direction the icon is thrown, and its random variation. |
| Launch Speed | 300โ500 | Random speed range. |
| Gravity | 1600 | How hard it falls. |
| Spin Speed | 90โ360 | Random tumble rate. |
| Squash Per Speed / Max Stretch | 0.0009 / 0.6 | How much speed distorts the icon, and the cap. |
| Duration | 0.9 | Seconds the exit takes. |
| Scale Out Start | 0.55 | Fraction of the exit at which it starts shrinking away. |
| Overshoot / Drop In Offset | 0.7 / 0,-28 | Entrance bounce and the offset it drops in from. |
| Spawn Angle Jitter | 8 | Random tilt on arrival, so a row doesn't look stamped. |
Floating bars over enemies
USKFloatingBarComponentAdd this to any pawn for a small bar that follows it in screen space. Useful for enemy health, boss health or a shield readout.
| Property | Default | Purpose |
|---|---|---|
| Bar Widget | โ | The resource-bar widget class to display. |
| Resource | Health | Which resource it tracks โ health, shield or energy. |
| Bar Size | 120 ร 14 | Size in screen pixels. |
| Auto Hide | On | Hide when full and idle, so a screen of healthy enemies isn't cluttered with bars. |
| Auto Hide Delay | 2 | Seconds before hiding. |
| Reveal Below Percent | 0 | Always show below this fraction. |
| Z Order | 0 | Draw 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.
| Setting | Where | Purpose |
|---|---|---|
| Show Damage Numbers | Game mode | Master toggle. |
| Damage Number Widget Class | Game mode | The styled widget to pop. |
| Duration | Widget | Seconds on screen. Default 0.8. |
| Rise Pixels | Widget | How far it floats up. Default 60. |
| Pop Overshoot | Widget | Scale 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