Game text tf: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Updated with data from tf-abs.fgd)
Line 1: Line 1:
{{wrongtitle|title=game_text_tf}}
{{tf2 point|game_text_tf}}
{{Tf2 point}}


== Entity description ==
== Entity description ==
[[Image:Game text.png|left]]An entity that displays text on players' screens. This text can be defined directly in the Hammer editor (unlike the similar [[env_message]] entity). This entity is suitable for stand alone bsp maps, if they are not to be [[VGUI_Documentation#Localization|localized]].
[[File:Game text.png|left]]An entity that displays text on players' screens. This text can be defined directly in the Hammer editor (unlike the similar [[env_message]] entity). This entity is suitable for stand alone bsp maps, if they are not to be [[VGUI_Documentation#Localization|localized]].


{{Warning|Don't use quotation characters (") in the ''Text Message'' field (not even <code>\"</code> 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. <tt>&ldquo;</tt> and <tt>&rdquo;</tt>).}}
{{Warning|Don't use quotation characters (") in the ''Text Message'' field (not even <code>\"</code> 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. <tt>&ldquo;</tt> and <tt>&rdquo;</tt>).}}
{{clr}}
{{clr}}
{{Note|This entity will not display when using the TF2 minimal HUD.}}


{{Note | This entity will not display when using the TF2 minimal HUD.}}
==Keyvalues==
{{KV Targetname}}
{{KV|Message Text|string|Message to display onscreen.}}
{{KV|Icon|string|Hud icon ( from mod_textures.res ) to display.}}
{{KV|Audience|Choices}}
:* 0 : Everyone
:* 2 : Red Team Only
:* 3 : Blue Team Only
{{KV|Background Panel Color|Choices}}
:* 0 : Grey
:* 2 : Red
:* 3 : Blue


== Keyvalues ==
==Inputs==
*{{KV Targetname}}
{{I Targetname}}
*'''message'''
{{IO|Display|Display the message text.}}
:<string> Message to display on screen. \n signifies a new line in the text.
*'''icon'''
:<string> Hud icon (from mod_textures.res) to display.
*'''display_to_team'''
:<choices> Audience
:{| class=standard-table
! Literal Value || Description
|-
| 0 || Everyone
|-
| 2 || Red Team Only
|-
| 3 || Blue Team Only
|}
*'''background'''
:<choices> Background Panel Color
:{| class=standard-table
! Literal Value || Description
|-
| 0 || Grey
|-
| 2 || Red
|-
| 3 || Blue
|}


== Inputs ==
==Outputs==
*{{I Targetname}}
{{O Targetname}}
*'''Display'''
:Display the message text for approximately one second.
 
== Outputs ==
*{{O Targetname}}
 
[[Category:Team Fortress 2 Entities]]

Revision as of 01:32, 10 May 2011

Team Fortress 2 game_text_tf is a point entity available in Team Fortress 2 Team Fortress 2.

Entity description

Game text.png

An entity that displays text on players' screens. This text can be defined directly in the Hammer editor (unlike the similar env_message entity). 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 ).
Note.pngNote:This entity will not display when using the TF2 minimal HUD.

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 ([todo internal name (i)]) <string>
Message to display onscreen.
Icon ([todo internal name (i)]) <string>
Hud icon ( from mod_textures.res ) to display.
Audience ([todo internal name (i)]) <choices>
  • 0 : Everyone
  • 2 : Red Team Only
  • 3 : Blue Team Only
Background Panel Color ([todo internal name (i)]) <choices>
  • 0 : Grey
  • 2 : Red
  • 3 : Blue

Inputs

Display
Display the message text.

Outputs