[TUTORIAL] the TF_GAMERULES entity

Discussion in 'Tutorials & Resources' started by spaceweasels, Nov 21, 2007.

  1. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    334
    Inspired by Logo's tutorial here, I decided to explore a bit more on an aspect of TF2 that most don't realize exist.

    [​IMG]

    [​IMG]
    This is the spawn message for a team. You could say "you are now defending" or "you are offensive... to smell!". For example:
    [​IMG]
    VALVe had some preset messages, but you can type in your own.
     
    • Thanks Thanks x 7
    Last edited by a moderator: Jan 10, 2008
  2. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    334
    [​IMG]
    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:
    [​IMG]

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

    [​IMG]
    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.
     
    • Thanks Thanks x 6
    Last edited: Nov 21, 2007
  3. Snipergen

    Snipergen L13: Stunning Member

    Messages:
    1,053
    Positive Ratings:
    150
    this is awesome

    what font is this too? :p

    kudos!
     
  4. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    334
    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.
     
  5. Logo

    Logo L3: Member

    Messages:
    115
    Positive Ratings:
    25
    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.
     
  6. Alexforcefive

    Alexforcefive Guest

    Positive Ratings:
    0
    I'm voting spaceweasels for member of the month!
     
  7. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    334
    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:
    [​IMG]
     
    • Thanks Thanks x 4
    Last edited: Nov 21, 2007
  8. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,506
    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
     
  9. Novacane

    Novacane Guest

    Positive Ratings:
    0
    Awesome dude. Was wondering where that entity was :D Some great work.
     
  10. TheBladeRoden

    TheBladeRoden L7: Fancy Member

    Messages:
    490
    Positive Ratings:
    162
    This could be useful
     
  11. ThatGuy

    ThatGuy L2: Junior Member

    Messages:
    51
    Positive Ratings:
    0
    doesn't setstalemateontimelimit automatically end the map ? and not go in sudden death?
     
  12. S.E.A.L.#555

    S.E.A.L.#555 L1: Registered

    Messages:
    23
    Positive Ratings:
    8
    Nice one! .
     
  13. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    334
    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
     
  14. die_angel

    die_angel L1: Registered

    Messages:
    15
    Positive Ratings:
    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?
     
  15. die_angel

    die_angel L1: Registered

    Messages:
    15
    Positive Ratings:
    0
    There are two more by the way:

    input: AddRedTeamRespawnWaveTime
    input: AddBlueTeamRespawnWaveTime
     
  16. richard_cabeza

    richard_cabeza Guest

    Positive Ratings:
    0
    Great info.
     
  17. DrHaphazard

    DrHaphazard L5: Dapper Member

    Messages:
    249
    Positive Ratings:
    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?
     
  18. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,506
  19. DrHaphazard

    DrHaphazard L5: Dapper Member

    Messages:
    249
    Positive Ratings:
    12
    Ah, thanks for the quick reply snark!
     
  20. DrHaphazard

    DrHaphazard L5: Dapper Member

    Messages:
    249
    Positive Ratings:
    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