CTF score indicators with hybrid hud?

Discussion in 'Mapping Questions & Discussion' started by Terr, Sep 12, 2009.

  1. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    I have a CTF map that has an optional beneficial control point to try to break up stalemate situations.

    Unfortunately, this means that the HUD doesn't have sub-points for how many times either team has captured the flag.

    Any ideas? I've tried hooking up a math_counter for each team but I'm not sure how to get that information out to player's screens.

    Ideally I'd like to use a single game_text or game_text_tf entity on a recurring timer, but I'm not sure how to use the counter's OutValue or AddOutput features to change the message on-screen. And I'd really rather not make 32 different game_text entities to show scores for 16 caps per side, controlled by a logic_case... Or set up counters for 1s and 10's columns and print those out seperately...

    Maybe I should see if I can ditch the hybrid hud, keep the control point, and do a custom control-point (3 states) game_text(_tf) system instead.
     
  2. Artesia

    Artesia L6: Sharp Member

    Messages:
    278
    Positive Ratings:
    72
    use a math counter to keep track of the score, fire that into a logic_case, the logic case then targets 1 game_text with -> Addoutput, then in parameters type "message <insert what you want to change it to here>" for instance if you wanted to change it to just "2" it would be message 2

    that will change the message, you just need a logic_timer to refresh the text, and you'll want to tweak the settings so it is always on screen.
     
  3. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    I don't suppose there's any way to to combine the two counters into a single message? (Effectively, string concatenation.)
     
  4. Artesia

    Artesia L6: Sharp Member

    Messages:
    278
    Positive Ratings:
    72
    one counter for both teams? It's possible but not as practical, You'd have to be able to separate them logically with the logic_case. Basically you would have to have values on the math counter that would define the score for each team, which you would then fire into the logic case, like if the value of 32 means red has 8 points, blue has 4... basically you have to come up with system so every score possibility has it's own unique numerical value, but this would require many more logic cases, not only to change the game_text but also to see what to change that value to before it changes the text...

    simplest method is to use 2 math counters, one for each team, and just add 1 on capture, then on the math counter put outvalue to the logic case for that team, which then uses addoutput to change the game_text. For both teams, thats only 6 entities.
     
  5. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    What I meant was exactly that last case, but with a single game_text that somehow brought those two numbers together in the form: "You:2 Them:1".

    But from the looks of it there's no logic_string_join entity :p

    I may just try to go back to the normal CTF HUD since it is far less likely to confuse players, and add extra messages reminding them who has the point.
     
  6. Artesia

    Artesia L6: Sharp Member

    Messages:
    278
    Positive Ratings:
    72
    use 2 game_text and simply position them so they appear together, but be sure it looks okay on both standard, and widescreen resolutions...

    you should email the devs to see if they can give us the option of having the ctf score visible :p
     
  7. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    A quick update. Apparently anything I do to get the normal CTF hud back, also means I can't actually capture the control point.

    Right now I'm just printing out the number of captures with game_text, and if someone is on a server with the limit >14 it then it just shows "15+" and stops incrementing after that.
     
  8. Bob Ross

    Bob Ross L3: Member

    Messages:
    105
    Positive Ratings:
    9
    i have the same sort of thing going on right now. i made a set of lights that activate when you cap. so cap once=one light cap twice=two lights. it only goes up to 3 but its nice.