Multiple win-points per round?

Discussion in 'Mapping Questions & Discussion' started by Smyther, Aug 11, 2016.

  1. Smyther

    Smyther L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    So in 5cp, much like football, completing the objective nets you 1 win-point and resets the round.

    In basketball, you net 1 or more win-points, depending on how you won the round.

    Would it be possible to alter 5cp similarly?

    Specifically:
    - on stalemate, get awarded a point for every cp you control
    - on capping last, get 6 points (a point for every cp + bonus round win)
     
  2. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    58
    While it's not an "official" scoring system, you should be able to fake it.

    I'm not really a mapper and may be overthinking this a bit, but I imagine it will involve something like this...

    Since I don't know a good way to check who the owner of a point is at round end, we'll be using a pair of math_counter entities to track that.

    This is entirely theoretical, but it should work:

    tf_gamerules (if you don't have one)
    name: GameRules

    team_control_point_master (if you don't have one)
    Scoring Style: Add team score for each round won (this also acts as your bonus point)
    name: CP_master

    math_counter
    name: red_counter
    Initial Value: 2 (should match the number of control points RED starts with, see later section for alternative)
    Outputs:
    • OnGetValue - GameRules AddRedTeamScore

    math_counter
    name: blu_counter
    Initial Value: 2 (should match the number of control points BLU starts with, see later section for alternative)
    Outputs:
    • OnGetValue - GameRules AddBlueTeamScore

    logic_auto (if you don't already have one)
    Outputs:
    • OnMultiNewRound - red_counter SetValue 2 (should match the number of control points RED starts with, see later section for
    • OnMultiNewRound - blu_counter SetValue 2 (should match the number of control points BLU starts with, see later section for alternative)

    logic_relay
    name: stalemate_logic
    Outputs:
    • OnTrigger - red_counter GetValue
    • OnTrigger - blu_counter GetValue
    • OnTrigger - CP_master SetWinner 0

    team_round_timer
    Outputs:
    • OnFinished - stalemate_logic Trigger

    team_control_point or trigger_capture_area (add this to the 3 middle points)
    Outputs:
    • OnCapTeam1 - red_counter Add 1
    • OnCapTeam1 - blu_counter Subtract 1
    • OnCapTeam2 - red_counter Subtract 1
    • OnCapTeam2 - blu_counter Add 1

    team_control_point or trigger_capture_area (add this to RED last before your BLU win logic)
    • OnCapTeam2 - GameRules AddBlueTeamScore 5 (should be number of control points)

    team_control_point or trigger_capture_area (add this to BLU last before your RED win logic)
    • OnCapTeam1 - GameRules AddRedTeamScore 5 (should be number of control points)
    Removing the hard-coded numbers

    Note that the previous version is "brittle" meaning that if you change the number of cap points, it will require a large number of changes.

    However, it is possible to change this logic to make it auto-detect based on control point owners.

    Replace the parts from above with these:

    logic_auto
    Outputs:
    • OnMultiNewRound - red_counter SetValue 0
    • OnMultiNewRound - blu_counter SetValue 0
    math_counter
    name: red_counter
    Initial Value: 0
    Outputs:
    • OnGetValue - GameRules AddRedTeamScore

    math_counter
    name: blu_counter
    Initial Value: 0
    Outputs:
    • OnGetValue - GameRules AddBlueTeamScore

    team_control_point or trigger_capture_area (add this to RED last before your BLU win logic)
    • OnCapTeam2 - red_counter Subtract 1
    • OnCapTeam2 - blu_counter Add 1
    • OnCapTeam2 - blu_counter GetValue

    team_control_point or trigger_capture_area (add this to BLU last before your RED win logic)
    • OnCapTeam1 - red_counter Add 1
    • OnCapTeam1 - blu_counter Subtract 1
    • OnCapTeam1 - red_counter GetValue

    And finally, add this:

    team_control_point (all control points)
    Outputs:
    • OnRoundStartOwnedByTeam1 - red_counter Add 1
    • OnRoundStartOwnedByTeam2 - blu_counter Add 1
     
  3. Smyther

    Smyther L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Wow, even if it doesn't turn out like I exactly imagined, that's given me a lot to work with. Thanks!
     
Tags: