titles.txt Last edited 1 year ago2019-05-13 07:17:11 UTC

titles.txt is a text file used to define preset text messages that can be displayed to the player. These messages are displayed using an env_message entity.

Because this file is a generic file placed in the mod folder (e.g. half-life/valve), editing this file is discouraged unless you are using it in a custom mod. Otherwise, if you were to distribute this file with your maps, players would need to replace their existing titles.txt, which they may be unwilling to do if they have edited that file themselves. If you want to show text messages to the player outside of a custom mod, you should use a game_text entity.



The file uses a set of parameters that, once defined, will be active upon all the messages listed afterwards until they are redefined. These parameters are:


The messages themselves are defined in a simple layout. The layout should be as follows:
Message contents, that can span
multiple lines if necessary.
Messages with multiple lines will use
centered formatting.


Here is a sample section of a titles.txt file as an example.
$position -1 0.7
$effect 2
$color 100 100 100
$color2 240 110 0
$fadein 0.5
$fxtime 0.1
$holdtime 2
$fadeout 2

What a mess.

$position -1 0.8
$effect 1

Who'll clean this up?
Not me.
Test_Message will be a typewriter-style message, appearing near the bottom-middle of the screen. The letters will appear as orange for a split second before before changing to a basic grey text. The letters will appear fairly slowly.
Test_Message_2 will appear slightly lower than Test_Message did, and will use the flickery effect rather than the typewriter-style.


You must log in to post a comment. You can login or register a new account.