Overtime

  • If you're asking a question make sure to set the thread type to be a question!

Coolz

L2: Junior Member
Sep 19, 2013
72
26
Allright, so if you read my other forum you'd know I'm making a custom gamemode. I am now trying to program overtime in, but since theres really no conceivable way BLU can have the flag at 0:00, is there a way to make it overtime if the bomb is taken at 0:01-0:02? and then once the bomb is dropped (the guy carrying it dies) BLU loses and RED wins.
Is this possible? and if so, how?
 

henke37

aa
Sep 23, 2011
2,075
515
Please explain your logic as to why BLU can't have the flag at that time.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
If a timer has a valid OnFinished output it will trigger overtime if there is any objective in progress. It seems weird to me that Valve didn't want that last 30 seconds in the overtime.

So, here's how you fake it. This hinges upon being able to detect the current status of a flag, if you can't, then I don't know how to acieve this.

  1. Figure out how to detect the flag being picked up, then every (every) time it is picked up send SetCompareValue with a parameter of 1 to a logic_compare "overtime_check". Make sure the overtime_check has the initial value as 2 and the initial compare value as 0.
  2. Whenever the flag is returned send SetCompareValue 0 to overtime_check.
  3. When your normal timer reaches 00:01, ie On1SecRemain, send SetValueCompare 1 to overtime_check.
  4. overtime_check then should have an output OnEqualTo | <timer name> | Pause, as well as OnEqualTo | <tf_gamerules name> | PlayVO | vo/announcer_overtime.wav (overtime2, overtime3 or overtime4 exist too)
  5. Make a logic_relay called "overtime_end", make it start disabled and give it one output: OnTrigger | <timer name> | resume
  6. overtime_check needs to be able to trigger this, but only after the timer has been paused, so give it OnEqualTo | overtime_end | enable
  7. Give the overtime_check ent OnGreaterThan | overtime_end | trigger

In summary:

Whichever entity can detect the flag leaving/returning:
OnFlagPickup | overtime_check | SetCompareValue | 1
OnFlagReturn | overtime_check | SetCompareValue | 0

timer has:
On1SecRemain | overtime_check | SetValueCompare | 1

overtime_check (logic_compare) has:
initial value 2
initial compare value 0
OnEqualTo | <timer> | Pause
OnEqualTo | <tf_gamerules | PlayVO | vo/announcer_overtime.wav
OnEqualTo | overtime_end | enable
OnGreaterThan | overtime_end | trigger

overtime_end (logic_relay) has:
startdisabled
OnTrigger | <timer name> | resume
 

Coolz

L2: Junior Member
Sep 19, 2013
72
26
Please explain your logic as to why BLU can't have the flag at that time.

The timer is supposed to only go down when BLU doesn't have the flag-- meaning that they can't have it when 0:00 occurs- so the next best thing is 1 second left.