There are 2 ways to create text that appears on the screen, the first is the easiest and what almost every mapper uses however the second method is good for displaying large amounts of text on the screen as new lines can be placed in.First Method
First open up hammer or a map that you want to insert the text into. Using the entity tool spawn an entity and change it to a 'game_text'. I am going to call mine text in the name property.
By default the text will appear in the center of the screen where your crosshair would be. This is annoying in real deathmatch games, so in 'Y (0 - 1.0 = top to bottom) (-1 centers)' put in 0.75 so it is lower in the screen and less annoying.
In the field 'Message Text' type in your message, mine will be "I am some text". Also change 'Hold Time' to appear a bit longer on the screen. Change that to 4.
Usually it depends on how you want to activate it for what entities you will need to place, for this text it will be activated by a button. Create a block using the brush tool and change it to an entity by pressing the 'To Entity' button to the right of the screen. Change it to a 'func_button' and hit apply.
In the button's properties click the tab that says 'Outputs' and Click 'add'.
Add in the following to your button and your done! Just hit F9 to compile and test.Second Method
This still requires an entity to be placed in the map however it is a slightly different process. This message requires an external .txt file located in Steam/steamapps/halflife 2 deathmatch/hl2dm/scripts called 'titles.txt' to display the text. Different to the game_text new lines can easily be placed in, great for credits or long lines of text or dialogue however it is more difficult to set values as all are entered in as code variables.
Place an 'env_message' entity in the map, this time call this one text2. Also create a 'titles.txt' if it does not already exist.
Inside titles.txt enter this code. The values are similar to that of a game_text.
$position -1 0.75 //X, Y values
$effect 2 //scrolling
$color 255 255 255 //White
$color2 255 255 255 //White
$fxtime 0.25 //scrolling letters time
I am text.
See how i am on different lines
Now inside the env_message instead of typing in your message type in MY_TEXT like this:
That's it! Hope this helped :)
[***Spam hard... Become pro***]