[TUTORIAL] the TF_GAMERULES entity

Oct 25, 2007
219
690
Inspired by Logo's tutorial here, I decided to explore a bit more on an aspect of TF2 that most don't realize exist.

tf_gamerules1.jpg


tf_gamerules2.jpg

This is the spawn message for a team. You could say "you are now defending" or "you are offensive... to smell!". For example:
tf_gamerules0.jpg

VALVe had some preset messages, but you can type in your own.
 
Last edited by a moderator:
Oct 25, 2007
219
690
tf_gamerules3.jpg

Setting attacking or defending won't really affect the scoring of your map. You still need to setup CP or CTF entities properly. What this does however, is change the icon to either a shield or a sword. Here I set red to offensive and gave them a goal string:
tf_gamerules6.jpg


tf_gamerules4.jpg

You can manipulate respawn times with this output. Not only in the logic_auto entity, but anything. For instance, if you using a team_round_timer, as the clock winds down, you can have the respawn time shrink. I beleive there is also a similiar output called addredteamrespawnwavetime, but I'll have to test it.

tf_gamerules5.jpg

Logo already discussed this. This should be added. This doesn't work with the team_round_timer, this is for when the server itself reaches it's map rotation time limit.

There might be more setting out there. I'll see if I can find anything more and add it here.
 
Last edited:
Oct 25, 2007
219
690
I used two fonts. The bold face font is TF2BUILD, the smaller font is TF2professor. You can get those fonts (and others) in your \team fortress2\tf\resource folder.
 

Logo

L3: Member
Oct 25, 2007
115
26
space do you actually type the quotes (" ") when you put in the game objective directions? I tried using that entity before but didn't see the message come up. Granted I didn't play around with it too long though.
 
Oct 25, 2007
219
690
Nope, no quotes. Just type the message in directly. Try to avoid using special characters, such as backslashes, forwardslash, $, #, %, quotes and semicolon. Any of those could be misconstrued by the game engine to be an instruction.


edit:

This is what my final logic_auto entity looked like:
tf_gamerules8.jpg
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Furthermore, do not EVER put a double-mark quote (" as opposed to a ') in any field in Hammer. The VMF structure uses them and if one shows up in the wrong place Hammer will be unable to load the file and you'll have to go in with a text editor and take it out manually.

and this is very good! I had been wondering how I'd set the message given when you spawn but hadn't looked into it yet. All I've done with this thing so far is remove the respawn time while I'm ingame looking at my map and dying a lot :p
 
N

Novacane

Awesome dude. Was wondering where that entity was :D Some great work.
 

ThatGuy

L2: Junior Member
Nov 5, 2007
51
0
doesn't setstalemateontimelimit automatically end the map ? and not go in sudden death?
 
Oct 25, 2007
219
690
doesn't setstalemateontimelimit automatically end the map ? and not go in sudden death?

Yes, your right. Sudden death is handled by other entities. The setstalemateontimelimit give you the stalemate ending.

It was the only one I wasn't able to test. :p
 

die_angel

L1: Registered
Nov 28, 2007
15
0
That's great is there any way to change stuffs like each team's flag skin or, if it gives a point on cap or not?
 

die_angel

L1: Registered
Nov 28, 2007
15
0
There are two more by the way:

input: AddRedTeamRespawnWaveTime
input: AddBlueTeamRespawnWaveTime
 

DrHaphazard

L5: Dapper Member
Jan 6, 2008
249
12
Very nice info indeed, I was wondering though if the link to Logo's post that spaceweasel mentions will ever work. If not could someone summarise what logo had to say?
 

DrHaphazard

L5: Dapper Member
Jan 6, 2008
249
12
Just curious btw, how did you figure out what commands could be given using this tf_gamerules entity?

Somehow i doubt you randomly typed in SetBlueTeamGoalString to see what it would do =P