game_text
Last edited 5 years ago2019-05-13 07:53:55 UTC
- Wiki
- View Page
-
You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date.
Click here to see the current revision of this page.
This entity is used to display messages on-screen. It is used instead of
env_message because it doesn't need to a file full of message strings to be distributed with the map.
Attributes
- Name (targetname) - Property used to identify entities.
- Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
- Master (master) - The name of a multisource (or game_team_master) entity. A master must usually be active in order for the entity to work. Thus they act almost like an on/off switch, in their simplest form, and like an AND gate in the case of the multisource.
- Message Text (message) - The text to be displayed.
- X (x) - X position of text (across screen). (0 - 1.0 = left to right, -1 = center)
- Y (y) - Y position of text (up/down screen). (0 - 1.0 = top to bottom, -1 = center)
- Text Effect (effect) - Effect to apply to the text (0 = Fade In/Out, 1 = Credits, 2 = Scan Out).
- Color1 (color) - The main colour.
- Color2 (color2) - The highlight colour.
- Fade in Time (or character scan time) (fadein) - Time taken to fade in each character.
- Fade Out Time (fadeout) - Time taken to fade out message.
- Hold Time (holdtime) - Length of time to hold message on screen after fading in.
- Scan time (scan effect only) (fxtime) - The amount of time the highlight lags behind the leading edge of the text.
- Text Channel (channel) - Any of four channels can be used by this entity. If while one channel is being used another entity on the same channel is triggered, the old text will be cleared from the screen.
Flags
- All Players (1) - Show the text to all players. If not set, only the player who activated the game_text will see the message.
Notes
- message text longer than 79 (or 127?) characters in a single line will make the game crash, instead, use line break before it exceeds.
- Line breaks can be added with by inserting a \n after each sentence where you want a new line.
- X, y, effect, color, color2, fadein, fadeout and fxtime are the same as those found in titles.txt.
- Do not use an automatic trigger like trigger_auto to activate this entity if "All Players" flag is disabled, otherwise the game will crash.
- The easiest way to get a text-based message at the start of your level (in place of gametitle from worldspawn), like the Black Mesa one from HL, is to add a trigger_auto to the level and set it's target to the name of your game_text. Do not forget to check "All Players" flag. You might have to add a delay to the trigger, depending on whether you fade the screen in or not, but either way when the game starts your text will be displayed.
- For some reason, Valve saw fit to remove this entity from Team Fortress Classic.
4 Comments
You must log in to post a comment.
You can login or register a new account.
Decided to test for myself.
Vanilla Half-Life's text engine seem to be broken for anything that's not ASCII. It consumes single-byte character sets (presumably ANSI/Windows-1252/system locale) but the text rendering is consuming UTF-8. This results in the broken text consistent with the table in this page: https://www.i18nqa.com/debug/utf8-debug.html
Haven't looked at the other SDKs or engines (candidates include Updated/Unified/Featureful/Xash-fwgs/Pathos) on how they handle text. Hopefully better than the unrecoverable mess vanilla is in right now.
ALSO, JACK will purposefully mangle non-ASCII texts. You'd need to edit the .map directly and feed it to the compilers yourself.
2024-06-29
apparently HLCSG also needs
-notextconvert
argument. sauce: singularmurderertarget
attribute does not work. This entity can't trigger anything else.