Reference Verse

A text_block widget shows live text on the HUD — bind it to game state and updat

Updated
The code on this reference page is provided as-is and did not pass the latest compile check — treat the examples as a starting point and verify in your project.

A text_block shows live game state on the HUD.

ScoreText : text_block = text_block{}
if (PlayerUI := GetPlayerUI[Player]):
    PlayerUI.AddWidget(ScoreText)
var Score : int = 0
set Score = Score + 10
ScoreText.SetText(UIText("Score: {Score}"))

Takeaway — Change the var, call SetText, HUD updates.

Guides & scripts that use text_block_widget

Step-by-step tutorials that put this object to work.

Build your own lesson with text_block_widget

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →