Intel return countdown display

Discussion in 'Mapping Questions & Discussion' started by l3eeron, May 30, 2009.

  1. l3eeron

    l3eeron L8: Fancy Shmancy Member

    Messages:
    594
    Positive Ratings:
    86
    [​IMG]

    This system will display a simple text flag-return count down in the bottom left corner. I guess you could call this a tutorial of some sort, definitely sub-par, but I did my best! vmf included for your dissection.


    This was intended to be used for push-ctf maps, but will work good with regular 2 way ctf as well. I suck at making tutorials. But I would like to share the .vmf so you can apply/adjust the system to fit your needs.

    I like this set up because very little screen is taken up. How it works:

    This is a set up for a 30 second return timer. If your return timer differs, then you will need to adjust the oncase value to what ever the last 15 seconds are. If your return timer is set for 45 seconds, then your string of oncase values would be 30-45 (not 15-30 like this set up has).


    The timer refires every second, every refire an output gets sent to the counter to add 1. The logic case is waiting for the counter to reach 16. If/when the counter reaches 16, the logic case starts firing to the game_text ents, a new one each second starting with 15, then 14, then 13 etc.... until the timer stops sending it info, which is done onpick/return/capture.

    So:

    - flag drops
    - Timer starts clicking off seconds
    - Counter starts counting the seconds
    - Logic case starts the countdown
    - To stop the count down, the flag disables the timer onpickup/return/capture. Numbers will stop showing.
    - To reset the counter, the flag sets the counter's value back to 0 on pick up/return/capture.


    Here's the class info/outputs I used in the included vmf.



    item_teamflag
    name - Flag_Blue01
    Team - Blue
    Return time - 30

    Outputs
    OnCapture - CounterText - SetValue - 0
    OnCapture - Timer_Text - Disable
    OnDrop - Timer_Text - enable
    OnPickUp - Counter_Text - SetValue - 0
    OnPickup - Timer_Text - Disable
    OnReturn - Counter_Text - SetValue - 0
    OnReturn - Timer_Text - Disable

    logic_timer
    name - Timer_Text
    Start Disabled - Yes
    Refire Interval - 1

    Outputs
    OnTimer - Counter_Text - Add - 1

    math_counter
    Name - Counter_Text

    Outputs
    OutValue - Case_Text_01 - InValue

    logic_case

    Name - Case_Text_01
    Case01 - 15
    Case02 - 16
    Case03 - 17
    Case04 - 18
    Case05 - 19
    Case06 - 20
    Case07 - 21
    Case08 - 22
    Case09 - 23
    Case10 - 24
    Case11 - 25
    Case12 - 26
    Case13 - 27
    Case14 - 28
    Case15 - 29
    Case16 - 30


    Outputs

    OnCase01 - Text_FlagDrop_15 - Display
    OnCase02 - Text_FlagDrop_14 - Display
    OnCase03 - Text_FlagDrop_13 - Display
    OnCase04 - Text_FlagDrop_12 - Display
    OnCase05 - Text_FlagDrop_11 - Display
    OnCase06 - Text_FlagDrop_10 - Display
    OnCase07 - Text_FlagDrop_09 - Display
    OnCase08 - Text_FlagDrop_08 - Display
    OnCase09 - Text_FlagDrop_07 - Display
    OnCase10 - Text_FlagDrop_06 - Display
    OnCase11 - Text_FlagDrop_05 - Display
    OnCase12 - Text_FlagDrop_04 - Display
    OnCase13 - Text_FlagDrop_03 - Display
    OnCase14 - Text_FlagDrop_02 - Display
    OnCase15 - Text_FlagDrop_01 - Display
    OnCase16 - Text_FlagDrop_returned - Display

    game_text

    Create one game_text for each second to be disaplyed (1-15). Each number gets its own game_text.


    Name - Text_FlagDrop_01
    Message Text - 1
    X - 0
    Y - 1
    Fade in - .2
    Fade out - .2
    Hold time - .5

    Name - Text_FlagDrop_02
    Message Text - 2
    X - 0
    Y - 1
    Fade in - .2
    Fade out - .2
    Hold time - .5

    Name - Text_FlagDrop_03
    Message Text - 3
    X - 0
    Y - 1
    Fade in - .2
    Fade out - .2
    Hold time - .5

    through

    Name - Text_FlagDrop_15
    Message Text - 15
    X - 0
    Y - 1
    Fade in - .2
    Fade out - .2
    Hold time - .5


    ...and the "flag returned" text

    Name - Text_FlagDrop_returned
    Message text - Flag Has Returned
    Color - Red
    X - 0
    Y - 1
    Fade in - .2
    Fade out - .2
    Hold time - 3
     
    • Thanks Thanks x 4
    Last edited: May 30, 2009