Point worldtext: Difference between revisions
(Rainbow inputs/kv) |
mNo edit summary |
||
Line 20: | Line 20: | ||
*2: ignores pitch (looking up/down)|only={{tf2}}}} | *2: ignores pitch (looking up/down)|only={{tf2}}}} | ||
{{KV|Text Spacing X|intn=textspacingx|float|Spacing between each letter along the X axis. Negative values will invert the text.|only={{tf2}}}} | {{KV|Text Spacing X|intn=textspacingx|float|Spacing between each letter along the X axis. Negative values will invert the text.|only={{tf2}}}} | ||
{{KV|Rainbow|intn=rainbow|bool|Enables rainbow text. Cannot be modified by <code>color</code> or <code>SetColor</code> inputs.}} | {{KV|Rainbow|intn=rainbow|bool|Enables rainbow text. Cannot be modified by <code>color</code> or <code>SetColor</code> inputs.|only={{tf2}}}}} | ||
<!--{{KV|Text Spacing Y|intn=textspacingy|float|Spacing between each letter along the Y axis.|only={{tf2}}}} | <!--{{KV|Text Spacing Y|intn=textspacingy|float|Spacing between each letter along the Y axis.|only={{tf2}}}} | ||
:{{todo|How does this keyvalue work? this entity seemingly only displays one line at a time.}}--> | :{{todo|How does this keyvalue work? this entity seemingly only displays one line at a time.}}--> |
Revision as of 18:35, 2 December 2022
point_worldtext
is a point entity available in Counter-Strike: Global Offensive. It is also available in
Team Fortress 2.
It is an entity that displays a text message oriented in the world, at its origin.
Usage
point_worldtext displays a specified text message in a set position in the world. It can be of any size and color, but the text outline cannot be changed. You can change the text message in-game by firing AddOutput with the parameter "message" and then the message you want to display. One downside of this text type is that it's stationary in the world and it is not part of the HUD, so you can't ensure that all players see it at all times. If you want to display important information that the player(s) must be constantly aware of, then it is better to use a game_text.


Keyvalues
- Entity Message (message) <string>
- Text that should be displayed.
- Text Size (textsize) <float>
- Size of the text. Setting this to 0 will display nothing. Negative values will flip the text upside down.
- Color (color) <color255>
- Color of the text.
- Font (font) <material> (only in
) (also in
)
- Path to the font material sheet
- Orientation (orientation) <integer> (only in
)
- 0: stationary text
- 1: always face the player.
- 2: ignores pitch (looking up/down)
- Text Spacing X (textspacingx) <float> (only in
)
- Spacing between each letter along the X axis. Negative values will invert the text.
- Rainbow (rainbow) <boolean> (only in
)
- Enables rainbow text. Cannot be modified by
color
orSetColor
inputs.}
Flags
- 1: Start Disabled


Workaround:set the
textsize
keyvalue to 0 and use theSetTextSize
input to toggle visibility, or leavemessage
empty and use theSetText
input.
Inputs
- Enable
- Start displaying the message text.
- Disable
- Stop displaying the message text.


SetTextSize
or SetText
inputs instead. [todo tested in ?]- SetMessage <string >
- Set the message text.
- SetText <string > (only in
)
- Set the message text.
- SetTextSize <float > (only in
)
- Set the message text size. Setting this to 0 will hide the text. Negative values will flip the text upside down.
- SetTextSpacingX <float > (only in
)
- Set the spacing between letters along the X axis. Negative values will invert the text.
- SetColor <color255 > (only in
)
- Set the message color.
- SetFont <integer > (only in
)
- Set the message font. Accepts values 0 - 11
- SetOrientation <integer > (only in
)
- Set the message orientation

orientation 0
) is not centered at origin like other values. Instead, the first character in the message is printed at origin. This will cause your text to "shift" switching to/from 0- SetRainbow <integer > (only in
)
- Enables Rainbow Text
Outputs
See also
- point_message - A similar entity which displays a small custom message at a specific position in the game world.