How do you add to a player's score...

Discussion in 'Mapping Questions & Discussion' started by necro, Apr 23, 2008.

  1. necro

    necro L3: Member

    Messages:
    106
    Positive Ratings:
    13
    via a triggered event (like destroying the enemy's command center)
     
  2. rt3407v06p909

    rt3407v06p909 L1: Registered

    Messages:
    30
    Positive Ratings:
    17
    I believe the game_score entity will allow you to add to add to a players score in whatever increment you specify.

    I've also used it to add to a teams score, but in TF2 CTF games it doesn't appear to update the HUD, only the scoring screen you see when you press TAB.
     
  3. Foreverkul

    Foreverkul L4: Comfortable Member

    Messages:
    157
    Positive Ratings:
    14
  4. necro

    necro L3: Member

    Messages:
    106
    Positive Ratings:
    13
    according to other postings and the open letter to valve:

    "The game_score entity currently does not alter individual player scores, only team scores, making it difficult to correctly reward players completing custom objectives."

    So theres no work around or am I screwed?
     
  5. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    Maybe have an invisible, instant-capping CP that doesn't show in the HUD?
     
  6. necro

    necro L3: Member

    Messages:
    106
    Positive Ratings:
    13
    You're on the right track Pseudo. Heres what I did. I had a func_capturezone tied to the main CP. When capped, I had a relay temporarily enable a trigger_capture area which capped an invisible CP like you suggested. Worked fine on the test CP. However, when I multiplied that for all 5 CPs, TF2 started crashing. I believe there is a limit of 8 CPs in the game. FYI.

    So the final solution I came up with is having the trigger_capture_area tied directly to the main CPs (no invisible ones). So a flag carrier walks into the func_capturezone, which triggers a relay that temporaily enables the trigger_capturearea (set to a 0.01 second capture) which then captures the CP. Phew! Seems to work 95% of the time, but I have yet to test it in gameplay. One drawback I already see is that any other teammate standing on the CP will get credit for the cap too. But I can live with that.

    So this solved my dillema with crediting people for capping CPs in an Attack/Defend style map. I still need to figure out how to give points for destroying the enemy control room.
     
  7. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    You would only need one invisible CP because you can have multiple trigger_capture_area tied to a single CP. You could then use the SetTeam input to reset the CP to neutral (or whichever team). For destroying a control room, I guess you could just do the same thing and give points to anyone in the room when it was destroyed.
     
  8. necro

    necro L3: Member

    Messages:
    106
    Positive Ratings:
    13
    but dont I need to add the invisible CP to the team_control_point_round. which means destroying the control room becomes a mandatory step to winning a round?