Ctf - Deciding the winner

Discussion in 'Mapping Questions & Discussion' started by Solynth, Apr 3, 2009.

  1. Solynth

    Solynth L5: Dapper Member

    Messages:
    216
    Positive Ratings:
    23
    Hopefully this is the last help thread for my map.

    I need to know how to choose the winning team when the time runs out on my map. When both teams are on 0 and it runs out it goes to stalemate (And the screen fades to white and everyone dies in an explosion :laugh:).

    But, what if Blu were on 1 and Red were on 0, how do I make Blu win?
     
  2. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,515
    I'm guessing you have a timer of some sort governing your round length? Normally this would be easy to do but your mention of stuff happening at the end sounds like you aren't doing things normal. Explain the situation a bit more an I'll be able to better explain what you need. :)
     
  3. Solynth

    Solynth L5: Dapper Member

    Messages:
    216
    Positive Ratings:
    23
    I'm using a teamroundtimer, I have a few "OnFinished" Outputs to make the screen shake, the screen to fade to white, and the explosion sound to play, then it triggers the "GameRoundWin" And then the stalemate message comes up.
     
  4. GrimGriz

    GrimGriz L10: Glamorous Member

    Messages:
    774
    Positive Ratings:
    133
    Make a separate gameround win (for red and blu) and a logic compare for the scores so you know which one to trigger?
     
  5. Solynth

    Solynth L5: Dapper Member

    Messages:
    216
    Positive Ratings:
    23
    I have no idea what to do with the logic compare... :crying:
     
  6. GrimGriz

    GrimGriz L10: Glamorous Member

    Messages:
    774
    Positive Ratings:
    133
    If you're using real scores it might not matter...that's just how i did it with a math_counter scoring system...
     
    • Thanks Thanks x 1
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,515
    Make two math_counters, one for each team, to keep track of their score, and a logic_compare.

    On the counters set initial/min/max to 0. Have each team's capturezone use OnCapture to send an Add input to their counter with a value of 1.

    On red's math_counter do this:
    Column 1 Column 2 Column 3 Column 4
    OUTPUT TARGET INPUT PARAMETER
    OutValue (the logic_compare) SetValueCompare (blank)


    On blu's math_counter do this:
    Column 1 Column 2 Column 3 Column 4 Column 5
    OUTPUT TARGET INPUT PARAMETER DELAY
    OutValue (the logic_compare) SetCompareValue (blank) 0.00
    OutValue (the logic_compare) Compare (blank) 0.01


    Then on the logic_compare. Set the initial value to 0 (this will be red's score), and the compare value to 0 (this will be blu's score). Set up the following outputs on it:
    Column 1 Column 2 Column 3 Column 4
    OUTPUT TARGET INPUT PARAMETER
    OnEqual (the game_round_win) SetTeam 0
    OnGreaterThan (the game_round_win) SetTeam 2
    OnLessThan (the game_round_win) SetTeam 3


    This will adjust who the game_round_win makes win.

    (three ninjaposts under me! guess that took longer to post than I thought)
     
    • Thanks Thanks x 2
    Last edited: Apr 3, 2009
  8. Solynth

    Solynth L5: Dapper Member

    Messages:
    216
    Positive Ratings:
    23
    Thankyou :thumbup: I will marry you one day.
     
  9. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    748
    That example you showed also needs that compare thing on the red one btw. otherwise if red caps once and blue doesnt cap its still a stalemate.
     
  10. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,515
    Actually it doesn't. There are four inputs:
    SetValue (sets input and does not perform compare)
    SetValueCompare (sets input and performs compare)
    SetCompareValue (sets value to compare against and does not perform compare)
    Compare (performs compare)
     
  11. Solynth

    Solynth L5: Dapper Member

    Messages:
    216
    Positive Ratings:
    23
    1 more thing though, I made the team_round_timer have an output saying OnFinished to shake the world, fade the screen to white, and enable the trigger hurt. How do I make it only do this when it's a stalemate?