Point worldtext: Difference between revisions
Jump to navigation
Jump to search
Note: This entity has also been ported to
Team Fortress 2 as of 12/1/2022.
Tip:The texture sheet has a bone icon assigned to the "~" character.
Note: Text, size and color can be edited real time via AddOutput, making this entity very flexible and useful.
Bug:
Enable/Disable inputs do not affect text visibility. Setting this flag will means the text will never display [todo tested in ?]
Bug:
Enable/Disable inputs do not affect text visibility. Use the
(vscript branch has been merged) |
(New TF2 kv's/inputs/info. Need to test if these have been added to CSGO as well. Need to check if textspacingy/SetTextSpacingY actually exists. Need to add a font gallery.) |
||
Line 13: | Line 13: | ||
{{ScrollBox|title=Text Options|}} | {{ScrollBox|title=Text Options|}} | ||
{{KV|Entity Message|intn=message|string|Text that should be displayed.}} | {{KV|Entity Message|intn=message|string|Text that should be displayed.}} | ||
{{KV|Text Size|intn=textsize|float|Size of the text.}} | {{KV|Text Size|intn=textsize|float|Size of the text. Setting this to 0 will display nothing. Negative values will flip the text upside down.}} | ||
{{KV|Color|intn=color|Color255|Color of the text.}} | {{KV|Color|intn=color|Color255|Color of the text.}} | ||
{{KV|Font|intn=font|material|Path to the font material sheet|only={{P2CE}}}} | {{KV|Font|intn=font|material|Path to the font material sheet|only={{P2CE}}|also={{tf2}}}} | ||
:{{todo|Add font gallery for {{tf2}}. Accepts integer values 0 - 11}} | |||
{{KV|Orientation|intn=orientation|int|*0: stationary text | |||
*1: always face the player. | |||
*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 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.}}--> | |||
== Flags == | == Flags == | ||
*1: Start Disabled | *1: Start Disabled | ||
{{Bug|{{tf2}}Enable/Disable inputs do not affect text visibility. Setting this flag will means the text will never display}} | |||
::{{workaround|set the <code>textsize</code> keyvalue to 0 and use the <code>SetTextSize</code> input to toggle visibility, or leave <code>message</code> empty and use the <code>SetText</code> input.}} | |||
== Inputs == | == Inputs == | ||
Line 25: | Line 34: | ||
{{IO|Enable|Start displaying the message text.}} | {{IO|Enable|Start displaying the message text.}} | ||
{{IO|Disable|Stop displaying the message text.}} | {{IO|Disable|Stop displaying the message text.}} | ||
{{Bug|{{tf2}}Enable/Disable inputs do not affect text visibility. Use the <code>SetTextSize</code> or <code>SetText</code> inputs instead.}} | |||
{{IO|SetMessage|Set the message text.|param=string}} | {{IO|SetMessage|Set the message text.|param=string}} | ||
{{Bug|Does not work, use '''<code>[[AddOutput]] Message <string></code>''' instead.}} | {{Bug|Does not work, use '''<code>[[AddOutput]] Message <string></code>''' instead.}} | ||
{{IO|SetText|only={{tf2}}|param=string|Set the message text.}} | |||
{{IO|SetTextSize|only={{tf2}}|param=float|Set the message text size. Setting this to 0 will hide the text. Negative values will flip the text upside down.}} | |||
{{IO|SetTextSpacingX|only={{tf2}}|param=float|Set the spacing between letters along the X axis. Negative values will invert the text.}} | |||
<!--{{IO|SetTextSpacingY|only={{tf2}}|param=float|Set the spacing between letters along the Y axis.}} | |||
:{{todo|How does this input work? this entity seemingly only displays one line at a time.}}--> | |||
{{IO|SetColor|only={{tf2}}|param=color255|Set the message color.}} | |||
{{IO|SetFont|only={{tf2}}|param=int|Set the message font. Accepts values 0 - 11}} | |||
{{IO|SetOrientation|only={{tf2}}|param=int| Set the message orientation}} | |||
== Outputs == | == Outputs == |
Revision as of 16:25, 2 December 2022
point_worldtext
is a point entity available in Counter-Strike: Global Offensive.


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
Text Options:
- 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.
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
point_worldtext:
- 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
Outputs
See also
- point_message - A similar entity which displays a small custom message at a specific position in the game world.