How to make a custom message to players?

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Basically I would like to make my own one of these. I attempted to decomile the map this image came from, but it was protected.
6057253648_2a128cb4e6_z.jpg


Can anyone tell me how to create one of these?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
It is done with inputs sent to the tf_gamerules entity. SetRedTeamGoalString and SetBlueTeamGoalString, with the parameter being the text you want displayed.

If you want the icon different, there are two other options done using SetRedTeamRole and SetBlueTeamRole. Sending them with a value of 1 means defenders (shield icon) and 2 is attackers (sword icon).

edit: these messages are only shown the first 50 times you play the map. So if you have loaded your own map a lot while building/testing it (without changing the file name) you may end up not seeing them, but it will still be there. Just a head's up.
 
Last edited: