Skip to content

Customize the HUD

Player UI lives in WBP_PlayerHUD. Floating score numbers use WBP_HitDamage. The game mode creates the HUD widget at runtime and switches tabs with Change Hud Tab.

stateDiagram-v2
  [*] --> Start: Level begins
  Start --> InGame: Start Game Btn
  InGame --> GameOver: On Game Over
  GameOver --> Start: Restart Btn
  Start --> [*]: Exit Game Btn
Tab indexPanelVisible when
StartStart layout + cannon buttonsBefore Start Game
In-gamePlayer HUD PanelAfter Start Game
Game overGame Over PanelLives exhausted
  1. Open Blueprints/Widgets/WBP_PlayerHUD.
  2. Select Score Count Text (in-game tab).
  3. Change Text from the default to SCORE: 0 or your localized string.
  4. Compile and save — Update High Score / score logic still drives the numeric value at runtime.

Do not rename the widget unless you update every Blueprint reference.

Example — highlight high score on the start screen

Section titled “Example — highlight high score on the start screen”
  1. Open WBP_PlayerHUD → select High Score Text.
  2. Set Appearance → Color and Opacity (for example gold #FFD700).
  3. Optionally increase Font → Size.
  4. Play DemoMap — start screen should show the saved high score from slot SpaceShooterSaveGame with your styling.
WidgetUpdated by
Start Game BtnCalls Start Game on BP_SpaceRockGameMode
Exit Game BtnQuits the game
Restart BtnCalls Restart Game on the game mode
Score Count TextGame mode score updates during play
Asteroids Count TextInternal Update Asteroid Count
Remaining Lives Text / life displayShow Life Hearts on BP_Spaceship
High Score TextUpdate High Score after load / new record

Cannon Selection passes ECannonType into Start Game:

UI choiceEnumShip component
Single shotSingleShotBP_SingleShot
Triple shotTripleShotBP_TripleShot

Start Game calls Set Cannon Type on BP_Spaceship before Start Spaceship.

  1. Open WBP_HitDamage.
  2. Edit the score Text widget colour and the Crit Animation track (used when bIsCritical is true on Show Score).
  3. In BP_SpaceRock, critical multiplier defaults range from 1.2 (Small) to 1.8 (ExtraLarge) on Asteroids Score Crit Multiplier — higher multiplier triggers critical popups more often when that logic runs in Show Score.

WBP_HitDamage is added with Add To Viewport, positioned via Project World To Screen, then removed after a short delay.

  1. Save WBP_PlayerHUD and WBP_HitDamage.
  2. Play DemoMap.
  3. Walk through: start → in-game → game over → restart.
  4. Beat your high score once and restart the editor to confirm SpaceShooterSaveGame still loads on the start screen.