banner



How To Add Color To Steam Forum Text

Game text.png

game_text is a point entity available in all Source Source games. It displays text on players' screens. This text can be divers straight in the Hammer editor (different the similar env_message entity which uses the titles.txt file).

In multiplayer games, the text will normally but display for the activator of the "Brandish" input. The "All Players" flag can be ticked in lodge to display on the screens of all players.

Note.png Annotation: If you are creating a modernistic with its ain files and scripts, information technology's recommended to use the aforementioned env_message entity, which uses the titles.txt script for text parameters instead of keyvalues, assuasive the text to exist changed without having to recompile whatever maps. Information technology too supports newlines and quotation marks, different regular game_text.

Tip.png Tip: Despite comments stating otherwise, game_text supports localized strings (e.g. #HL2_Chapter4_Title) in most or all Source games.

Warning.png Warning: VMFs can become corrupted when using quotation marks (") in any entity'due south keyvalues or I/O, so quotation marks cannot exist used in the Text Message field (not even \" characters). You lot can employ two apostrophes ('') or detailed quotes (i.e. " and ") instead.

Bug.png Bug: Scales incorrectly for players that take game resolution higher than 1920x1080, text will be much larger and some text will exist hidden. To exercise:Is this Counter-Strike: Global Offensive just?

In lawmaking, it is represented by the CGameText class, defined in the maprules.cpp file.

Keyvalues

Bulletin Text (message) <string>
Bulletin to brandish onscreen. \n signifies a new line in the text.

Tip.png Tip: AddOutput message tin can be used to change text at runtime in older games which exercise not support SetText.

Bug.png Problems: Hammer will automatically alter \n to /north. This tin can be worked effectually by editing the VMF with a text editor, although it volition demand to exist changed every time after each save.

X (0 - ane.0 = left to correct) (-1 centers) (x) <string>
Horizontal position on the player'south screens to depict the text. The value should be between 0 and ane, where 0 is the far left of the screen and 1 is the far right. -one centers the text.
Y (0 - 1.0 = acme to bottom) (-1 centers) (y) <string>
Vertical position on the player's screens to draw the text. The value should exist betwixt 0 and 1, where 0 is the height of the screen and 1 is the bottom. -1 centers the text.
Text Effect (effect) <choices>
Text scan effect
  • 0: Fade In/Out. The whole text is faded in, and so faded out.
  • ane: Credits To practice:Unknown - seems to deed like Fade In/Out. Provide description.
  • 2: Scan Out. The text is scanned in letter of the alphabet by letter, and the whole text is and then faded out.
Color1 (color) <color255>
The chief color used by all the text effects.

Note.png Notation: The color values seem to be added to the background, and then either a brilliant white groundwork or blackness text will cause the message to be invisible.

Note.png Note: This keyvalue volition default to black for entities non created in Hammer.

Color2 (color2) <color255>
The scanning colour for the letter existence scanned if the Text Effect keyvalue is set to Scan Out - commonly a different shade of Color1.
Fade in Time (or character scan fourth dimension) (fadein) <string>
The time it should accept for the text to fully fade in.
Fade Out Time (fadeout) <string>
The time it should take for the text to fade out, later the hold time has expired.
Concur Time (holdtime) <string>
The time the text should stay onscreen, after fading in, earlier information technology begins to fade out.

Note.png Annotation: This value defaults to zip for entities not created in Hammer.

Scan time (scan issue only) (fxtime) <string>
If the 'Text Upshot' is set to Browse Out, this is the time it should have to scan out all the letters in the text.
Text Channel (channel) <choices>
You can have upwards to vi individual game_text messages onscreen at in one case, stored in channels. Select which channel this text should be placed in, which will overwrite any active message already in that channel.
  • 0: Channel 0 (unused) !FGD
  • i: Channel 1 (medium text size)
  • ii: Channel 2 (small text size)
  • 3: Aqueduct 3 (large text size)
  • iv: Channel 4 (medium text size)
  • five: Channel 5 (unused) !FGD
Chief (master) <string>
Legacy support: The proper name of a master entity. If the master hasn't been activated, this entity will not actuate.

Flags

  •  [ane] :All Players

Inputs

Brandish
Display the message text.

Note.png Annotation: If the All Players flag is non set, the player must be the !activator of this input in gild for the text to exist shown.

SetText <cord>(in all games since Alien Swarm)
Fix the text to display.

Tip.png Tip: In older games, AddOutput message can exist used to change text, although the Display input must be fired again.

SetPosX <float>(in all games since Portal 2)
Set the X position of the text. (0 - 1.0 = left to right) (-ane centers)
SetPosY <float>(in all games since Portal 2)
Gear up the Y position of the text. (0 - 1.0 = peak to bottom) (-1 centers)
SetTextColor <color255>(in all games since Portal 2)
Set color of the forepart text.
SetTextColor2 <color255>(in all games since Portal 2)
Set color of the transition text.

Outputs

OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled(only in Left 4 Dead series)
This output fires when the entity is killed and removed from the game.

See also

  • point_message - A similar entity that displays a small custom message at a specific position in the game globe.
  • Customizable triggered HUD-message - How to create a new entity that is similar to game_text just tin receive the message string via a triggered input.

How To Add Color To Steam Forum Text,

Source: https://developer.valvesoftware.com/wiki/Game_text

Posted by: hazeltonopurnisting.blogspot.com

0 Response to "How To Add Color To Steam Forum Text"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel