tf_gamerules how do I add points to team score?

Discussion in 'Mapping Questions & Discussion' started by TheMightyGerbil, Apr 5, 2016.

  1. TheMightyGerbil

    TheMightyGerbil L1: Registered

    Messages:
    25
    Positive Ratings:
    6
    Hello I joined this forum years ago, mapped for years alone but didn't post. Today I hit my limit break after 6+ hours of trying to get something super simple to work.

    I want to score points manually.
    tf_gamerules has AddRedTeamScore and AddBlueTeamScore inputs.
    I've tried firing them from triggers, item_teamflags, and through logic_relays.
    I've tried a parameter override of 1 , 2 , 3 , "1", +1 and I've tried leaving it blank.

    All the entities show connected correctly.

    Nothing happens. There are only 3 dialog boxes and no flags I can see that need setting. Why does this not work?

    If I deliberately mess the parameter override or do it without the logic_relay it will give me...

    !! ERROR: bad input/output link:
    !! tf_gamerules(tf_gamerules,AddRedTeamScore) doesn't match type from logic_relay

    ...but that only shows the output is reaching tf_gamerules that error won't show if I use what I think is correct, a 1 and a logic_relay.

    ...and yes I've googled until I'm blue.

    To any replies I have to go for a bit and will probably reply tomorrow. Thank you for any help.
     
    Last edited: Apr 5, 2016
  2. Davekillerish

    aa Davekillerish Lvl O: Orange Member

    Messages:
    1,428
    Positive Ratings:
    793
    Perhaps posting a DL to your VMF would be an easier way to solve your problem, so we know what your talking about.
    Or some screenshots of your logic
     
  3. TheMightyGerbil

    TheMightyGerbil L1: Registered

    Messages:
    25
    Positive Ratings:
    6
    Here is a simple .vmf example right click and save, it's super small, I also uploaded it below. When you break a brush a team should get a point in the example. There should be a way to bind scoring points to any entity's output, which is what I want to do, not specifically the breaking brush example. tf_gamerules seems to be that way when it has AddRedTeamScore and AddBlueTeamScore inputs but it doesn't work. I'm guessing I'm either overthinking it and missing some simple mistake I made or those inputs are broke. I haven't mapped for a while so maybe there is some other entity I needed to add, IDK, but then I've never tried to manually score things. Thanks.
     

    Attached Files:

    Last edited: Apr 6, 2016
  4. Egan

    aa Egan

    Messages:
    1,302
    Positive Ratings:
    1,478
    These commands will only affect the score on the scoreboard when a player brings it up with the TAB key:
    [​IMG]


    But not any other sort of score mechanism like the CTF HUD (which I assume you are trying to change):
    [​IMG]


    The only way to affect the CTF HUD scores is to have a player carry an item_teamflag into a func_capturezone. Video.

    Alternatively try to find another HUD mechanism to use, like the PD HUD or using game_text entities.
     
    • Thanks Thanks x 1
  5. TheMightyGerbil

    TheMightyGerbil L1: Registered

    Messages:
    25
    Positive Ratings:
    6
    Bummer :( . I don't get why Valve didn't put in a simple mechanism for this as it could be used to create a lot of game modes. I mean what is the point of altering it on the scoreboard if it functionally does nothing. I'm probably going to have to go back to figuring out how to do in a source mod plugin. I had it half way but hoped this would be a simpler method.

    I've got a backlog of questions I'll probably be asking now I've posted but I'll save those for later. Thanks for your time and answers.
     
  6. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    998
    Positive Ratings:
    1,135
    If I'm understanding your problem right, you could easily accomplish this score counting with Player Destruction entities instead of the scoreboard (which is more typically used to count rounds won rather than scores within a round). All you'd have to do is configure the collectible flags to not drop and send inputs to increment the score directly instead of through flag captures. I can explain in more detail if this sounds like the solution you're looking for.
     
    • Thanks Thanks x 1
    • Like Like x 1
  7. TheMightyGerbil

    TheMightyGerbil L1: Registered

    Messages:
    25
    Positive Ratings:
    6
    Hmmm I downloaded the pd_prefab just now, played with it, and got it to score via breaking a brush. I'm not certain this will work or not but it's something, thanks. I'm going to have to mess with it more.

    Does replacing the .res file in tf_logic_player_destruction actually work and allow your clients to have your custom hud? I ask because I've never done it but have had problems with getting custom CTF models to work (a question for another time).

    Also I was thinking is there a server command to give a team a point directly that way? If so there was an entity for sending these commands in a map but I can't remember the name. What was it?
     
  8. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    998
    Positive Ratings:
    1,135
    Yes, replacing the .res file does work, but you'll want to use HudObjectivePlayerDestruction as the base no matter what because the PD entities are made to work with it. You can edit it pretty extensively like Egan did for Watergate, though.

    You're thinking of point_servercommand. If such a convar exists (which I'm not sure it does) you can technically use this method. But since TF2 now has a convar for point_servercommands that disables them by default, you may run into problems running your map on servers that have this convar set. I would suggest avoiding the use of a point_servercommand if you can.

    If you decide to go through with the PD entities down the road, ping me and I can walk you through the little tweaks you need to make to turn it into a generic scoring system.
     
    • Thanks Thanks x 2