Game text tf: Difference between revisions
Jump to navigation
Jump to search

Warning: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 can use two single quotes ('') or detailed quotes (“ and ”).
Warning:This entity will not display when using the TF2 minimal HUD. Use a game_text or an env_screenoverlay entity if you have vital information to display.
Kestrelguy (talk | contribs) m (→Keyvalues: added the internal names of some variables.) |
Kestrelguy (talk | contribs) (added some example icons. also updated template usage.) |
||
Line 1: | Line 1: | ||
{{tf2 point|game_text_tf}} Similar to | {{lang|Game text tf}} | ||
{{Warning|Don't use quotation characters (") in the | {{tf2 point|game_text_tf}} Similar to {{ent|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 standalone maps, if they are not to be [[VGUI_Documentation#Localization|localized]]. | ||
{{Warning|Don't use quotation characters (<tt>"</tt>) in the "Text Message" field (not even <tt>\"</tt> 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 can use two single quotes (<tt><nowiki>''</nowiki></tt>) or detailed quotes (<tt>“</tt> and <tt>”</tt>).}} | |||
{{Warning|This entity will not display when using the TF2 minimal HUD. Use | {{Warning|This entity will not display when using the TF2 minimal HUD. Use a {{Ent|game_text}} or an {{ent|env_screenoverlay}} entity if you have vital information to display.}} | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV|Message Text|intn=message|string|Message to display onscreen.}} | {{KV|Message Text|intn=message|string|Message to display onscreen.}} | ||
{{KV|Icon|intn=icon|string| | {{KV|Icon|intn=icon|string|HUD icon (from <tt>mod_textures.res</tt>) to display.}} | ||
{{ExpandBox|title=Some Default Icons| | |||
*whiteAdditive: Additive White | |||
*plus_sign: "+" | |||
*minus_sign: "−" | |||
*dollar_sign: "$" | |||
*health_icon: Health Icon | |||
*timer_icon: Timer Icon | |||
*shield: Shield | |||
*number_0: "0" | |||
*number_1: "1" | |||
*number_2: "2" | |||
*number_3: "3" | |||
*number_4: "4" | |||
*number_5: "5" | |||
*number_6: "6" | |||
*number_7: "7" | |||
*number_8: "8" | |||
*number_9: "9" | |||
Additionally, any internal weapon name (e.g., "pistol" for the {{tfwiki|Pistol}} or "nessieclub" for the {{tfwiki|Nessie's Nine Iron}}) will show the icon for that weapon.}} | |||
{{KV|Audience|intn=display_to_team|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 | ||
Line 16: | Line 34: | ||
:* 2 : Red | :* 2 : Red | ||
:* 3 : Blue | :* 3 : Blue | ||
{{KV BaseEntity|base=1}} | |||
==Inputs== | ==Inputs== | ||
{{IO|Display|Display the message text.}} | {{IO|Display|Display the message text.}} | ||
{{I BaseEntity|base=1|noscroll=0}} | |||
==Outputs== | ==Outputs== | ||
{{O | {{O BaseEntity}} |
Revision as of 10:10, 7 October 2022


game_text_tf
is a point entity available in 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 standalone maps, if they are not to be localized.


Keyvalues
- Message Text (message) <string>
- Message to display onscreen.
- Icon (icon) <string>
- HUD icon (from mod_textures.res) to display.
Some Default Icons
Pistol or "nessieclub" for the
Nessie's Nine Iron) will show the icon for that weapon.
- whiteAdditive: Additive White
- plus_sign: "+"
- minus_sign: "−"
- dollar_sign: "$"
- health_icon: Health Icon
- timer_icon: Timer Icon
- shield: Shield
- number_0: "0"
- number_1: "1"
- number_2: "2"
- number_3: "3"
- number_4: "4"
- number_5: "5"
- number_6: "6"
- number_7: "7"
- number_8: "8"
- number_9: "9"


- 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.