Skip to content

Text

Creates, edits, and removes named text overlays displayed on the client HUD. Each text is identified by an id and can be repositioned, recolored, faded, animated, and typed independently.

Side

CLIENT

Syntax

text <id:string> <action:string> [param1] [param2] [param3] [param4] [--block]

Parameters

  • id (string, required): Unique identifier for this text overlay. Used to reference it in subsequent actions.
  • action (string, required): Operation to perform. See the table below for each action and its expected parameters.
  • --block (flag, optional): Used with type, fade, fadein, fadeout and animate. Pauses story progression until the effect finishes.

Actions

Actionparam1param2param3param4
createtext content (required)hex color (optional)
remove
editnew text content (required)
position / posposition value (required)
spacex value (required)y value (required)
colorhex color (required)
opacityopacity float 0.0 to 1.0 (required)
scalescale float (required)
widthwrap width in pixels (required)
text_alignmentleft, center or right (required)
shadowboolean (optional)
muteboolean (optional)
fadefadeIn seconds (required)stay seconds (required)fadeOut seconds (required)
fadeinduration seconds (required)
fadeoutduration seconds (required)
animatefrom point (required)to point (required)duration seconds (required)easing (optional)
typescroll speed (optional)

Position values: top_left, top, top_right, middle_left, middle, middle_right, bottom_left, bottom, bottom_right

Animation points: either a position value, or an x,y pixel offset applied to the current anchor. Positive values shift the text left and up.

Easing values: linear, ease_in, ease_out, smooth. Defaults to linear.

mute silences the letter sound played by the type action.

Examples

// Create a centered white subtitle
# text subtitle create "Hello world"
// Move an existing text to the bottom center
# text subtitle position bottom
// Change the text color to red and align it on the left
# text subtitle color FF0000
# text subtitle text_alignment left
// Play a typewriter effect and block until it finishes
# text subtitle type 1.5 --block
// Slide the text up into place over half a second
# text subtitle animate "0,-30" middle 0.5 ease_out --block
// Fade the text out over 1 second then remove it
# text subtitle fadeout 1.0
# text subtitle remove