How to make a custom message to players?

Discussion in 'Mapping Questions & Discussion' started by Werewolf, Aug 18, 2011.

  1. Werewolf

    aa Werewolf Probably not a real Werewolf

    Positive Ratings:
    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.[​IMG]

    Can anyone tell me how to create one of these?
  2. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Positive Ratings:
    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: Aug 18, 2011