Overtime

Discussion in 'Mapping Questions & Discussion' started by Coolz, Sep 14, 2014.

  1. Coolz

    Coolz L2: Junior Member

    Messages:
    72
    Positive Ratings:
    18
    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?
     
  2. henke37

    aa henke37

    Messages:
    1,945
    Positive Ratings:
    461
    Please explain your logic as to why BLU can't have the flag at that time.
     
  3. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,920
    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
     
    • Thanks Thanks x 1
  4. Coolz

    Coolz L2: Junior Member

    Messages:
    72
    Positive Ratings:
    18
    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.