Changing the Flag Return Time During Gameplay

D

Digaag Wa Riz

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 by a moderator:

Micnax

Back from the dead (again)
aa
Apr 25, 2009
2,109
1,585
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.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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.