Game text tf: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Updated the entity description.)
m (→‎Keyvalues: added the internal names of some variables.)
Line 6: Line 6:
==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV Targetname}}
{{KV|Message Text|string|Message to display onscreen.}}
{{KV|Message Text|intn=message|string|Message to display onscreen.}}
{{KV|Icon|string|Hud icon ( from mod_textures.res ) to display.}}
{{KV|Icon|intn=icon|string|Hud icon ( from mod_textures.res ) to display.}}
{{KV|Audience|choices|Filters which team(s) will see this message.}}
{{KV|Audience|intn=display_to_team|choices|Filters which team(s) will see this message.}}
:* 0 : Everyone
:* 0 : Everyone
:* 2 : Red Team Only
:* 2 : Red Team Only
:* 3 : Blue Team Only
:* 3 : Blue Team Only
{{KV|Background Panel Color|choices|Color of the text panel.}}
{{KV|Background Panel Color|intn=background|choices|Color of the text panel.}}
:* 0 : Grey
:* 0 : Grey
:* 2 : Red
:* 2 : Red

Revision as of 08:09, 3 March 2022

Team Fortress 2 game_text_tf is a point entity available in Team Fortress 2 Team Fortress 2. Similar to game_text, it is an entity that displays text on players' screens. The text is displayed in a colored box with an optional image texture next to it. This text can be defined directly in the Hammer editor. This entity is suitable for stand alone bsp maps, if they are not to be localized.

Warning.pngWarning:Don't use quotation characters (") in the Text Message field (not even \" characters). It will cause fatal errors with opening and/or compiling your map and may need to be fixed by manually editing the VMF in a text editor. Instead, you use detailed quotes (i.e. and ).
Warning.pngWarning:This entity will not display when using the TF2 minimal HUD. Use either a game_text or an env_screenoverlay entity if you have vital information to display.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Message Text (message) <string>
Message to display onscreen.
Icon (icon) <string>
Hud icon ( from mod_textures.res ) to display.
Audience (display_to_team) <choices>
Filters which team(s) will see this message.
  • 0 : Everyone
  • 2 : Red Team Only
  • 3 : Blue Team Only
Background Panel Color (background) <choices>
Color of the text panel.
  • 0 : Grey
  • 2 : Red
  • 3 : Blue

Inputs

Display
Display the message text.

Outputs