Skip to main content

point_worldtext

point_worldtext icon
Point entity

A point_worldtext draws text in the world at its origin, such as a label, a sign or a note, without a texture. Every player sees it, also players who join later, spectators and demos. See World text for how to place it.

point_worldtext labels on a wall of co_sbo_showcase

World text labels on a wall

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Move withSpirit of Half-Lifemovewith

Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.

If you leave this key empty, the entity doesn't move with anything.

Axis locksparentflags

Keeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.

Default 0
Entity Messagemessage

Sets the text, and \n starts a new line. The text can have up to 1023 bytes of UTF-8 text, so accents and arrows work. A character that the font doesn't have shows as ?.

Text Sizetextsize

Sets the height of a line, in units.

Default 10
Text Spacing XtextspacingX

Sets extra space after each letter, in 1/64 of the Text Size for a sans font or 1/128 for a mono font. Negative values pull the letters together.

Default 0
Text Spacing YtextspacingY

Sets extra space between the lines, in 1/64 of the Text Size for a sans font or 1/128 for a mono font. Negative values pull the lines together.

Default 0
Colorcolor

Sets the color of the text and its opacity, as R G B A.

Default 255 255 255 255
Fontfont

Sets the font and the outline, shadow or glow around its letters.

  • Sans, black outline (0)
  • Sans (1)
  • Sans, glow (12)
  • Sans, drop shadow (13)
  • Mono (terminal), black outline (8)
  • Mono (terminal) (9)
  • Mono (terminal), drop shadow (10)
  • Mono (terminal), glow (11)
Default Sans, black outline (0)
Orientationorientation

Sets how the text turns.

  • Stationary (0) - The text lies in the plane of the entity's angles, and you read it when you look the way the entity points. It only has one side
  • Face player (1) - The text always faces the viewer
  • Face player, upright (2) - The text faces the viewer without tilting up or down
Default Stationary (0)
Rainbowrainbow

With Yes, the letters cycle through the colors of the rainbow, each letter a little ahead of the one before it.

  • No (0)
  • Yes (1)
Default No (0)

Flags​

1Start Off

The text stays hidden until you trigger the entity

2Center lines

Each line is centered on the origin. Without this flag, the origin is the start of the first line's baseline

Notes​

  • Triggering it shows or hides the text, as the use type says
  • A trigger_changevalue or a trigger_copyvalue can change any of its keys while the map runs, such as message, color, font or textsize. Every player sees the change
  • Text without a name takes no entity slot
  • A map can have up to 1024 point_worldtext entities, and the game leaves out the ones after that
  • Only the OpenGL renderer draws the text
  • With Move with, the text moves and turns with its parent, and each player's game draws it there. Such text keeps its entity slot, also without a name. See Moving objects

See also​

  • World text - how to place text and which characters work
  • vgui_screen - a screen in the world that players click

Changes since 1.38​

  • point_worldtext is new