Changing the Flag Return Time During Gameplay

Discussion in 'Mapping Questions & Discussion' started by Digaag Wa Riz, Dec 15, 2012.

  1. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Positive Ratings:
    Hello all. I have a question.

    I'm making a new gametype because I suck at making appealing scenery so much I have to add replayability to my maps through gametype novelty. This gametype is not much different from CTF. In fact, it's the same except only BLU is able to capture (as there is only a RED flag) and they win after capturing once. Instead of RED capturing, they defend the capture zone for a certain amount of time from BLU. The flag has an initial return time of 90 seconds.

    I understand that if someone is holding a flag when the timer hits zero that it goes into overtime. What I want to do, but don't know how to, is make the return time on the flag drop to zero when the timer runs out so BLU still has a chance to capture if they are holding the flag when time is up. I do not want the flag to forcibly be dropped. I think I have to use the AddOutput function somewhere but I can't seem to make it work.
    Last edited: Dec 15, 2012
  2. Micnax

    aa Micnax I maek map

    Positive Ratings:
    Not sure how to check when the game has gone into Overtime (could do with the tf_gamerules or a logic_timer that can be fired), but I'd guess you should have an output firing to the item_teamflag entities when the game goes into overtime that will set the Return time keyvalue to 0.

    Boojum should be able to help you out if he pounces in this thread.
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Positive Ratings:
    You are correct that you use AddOutput, the parameter for chaning a key should be keyname newvalue so in your case it should be returntime 0 (the key name used is what is shown if you un-press the "smart edit" button on entity properties).

    I have used this before so it should be working.
    • Thanks Thanks x 1