Visual Timer / Counter

A Map Prefab for Counter-Strike: Source

A timer or counter for your map.

Wanted to make a timer/counter. Did so. :3 This uses func\_brush for the numbers (7 for each number), a logic_case and a math\_counter for each number. It's pretty much just a counter, but adding a logic\_timer with a refire of 1s means it can be used as a timer too. The timer adds 1 to the counter every second, which sends its current value to the logic_case. The logic\_case compares the number input from the math\_counter to the cases it has, and fires the first case that matches. Depending on which case is fired, it enables or disables each func\_brush to show the number. When the counter hits its max (which is after 10s) it adds 1 to the other counter, which controls the 2nd digit (the tens). The 2nd digit's counter does the same as the first, but it's triggered every ten seconds by the first counter instead of the timer. You could add more digits by copying and renaming the 2nd (left) digit with its case and counter. Then add an output on the 2nd digit's counter to add 1 to the 3rd digit's counter OnHitMax (pretty much copy the 1st digit's output to the 2nd). At the moment, it goes up to 99 and then resets and disables itself. To stop this, remove the current OnHitMax output on the 2nd digit (OnHitMax, resetBtn, press). If you want to use it as a timer, I'd suggest setting the "Maximum Legal Value" of the 2nd counter to 6. Preview video:
If used please credit me in some way.
Countdown Timer Updated! Now clamps at 00.
Edited the timer to count down instead of up, if you want that. Currently counts down from 60. I've edited it to be easier to read. You no longer need to add 1 to the first digit, just set it to what you want. It's pretty self explanatory. For those who don't understand: Change the initial values to the numbers you want. For example, if you want it to start at 45 seconds then set the initial value of the "digit1\_counter" counter to 5 and the initial value of the "digit2\_counter" counter to 4. As you can see, digit2\_counter controls the left or tens digit, while digit1\_counter controls the right or singles(?) digit. I think that's all that needs explaining. If you need some help just ask.

Full Countdown Timer with Minutes (Shown in the last two screenshots.)
After a few requests I have finally updated the timer to have two minute numbers, so it can now go from 99:59 (you could make it 99:99 but as it acts as a real timer there are 60 seconds) to 00:00. At 00:00 the timer will stop. Adding a Function/Ending When it Hits 00:00 To make it do something when it hits 00:00, simply add the output to the digit\_relay\_end logic\_relay entity. This is also the entity that stops the timer. So, for example, if you want to end the game when it hits 00:00, make a game_end entity, name it something (eg "ender"), then on the digit\_relay\_end entity add the output OnTrigger, ender, EndGame.
Round Resets: Just a note that func\_brush entities do NOT reset on new rounds. You will need to reset them manually using a logic\_auto entity. You can do this easily by setting the oounter values again, as this will trigger the logic\_compare entities to enable/disable the func\_brush entities. If you don't understand: Add a logic\_auto entity to the map (if you already have one then add the outputs below to the existing one). Add the following outputs to it
OnMapSpawn, digit1\_counter, SetValue, 0 OnMapSpawn, digit2\_counter, SetValue, 6
Remember to change 0 and 6 to your initial values. These go in the parameter override field not the delay field. If you are using the reset button then simply have the logic\_auto press the reset button (OnMapSpawn, reset\_btn, Press).
If you don't reset them then they will simply go back to normal after the counters change.
Sign up to access this!


11-20 of 11
  • 1
  • 2
Go to page:
  • Jonny-higgins avatar
    Jonny-higgins username pic Joined 12y ago
    Ripe Supporter
    200,383 points Ranked 15th
    43 medals 5 legendary 10 rare
    • Achieved Admin clearance Medal icon
    • Submitted 200 Threads Medal icon
    • Reached 100 subscribers Medal icon
    • 10 years a member Medal icon
    • Became a Ripe Supporter Medal icon
    • Reached 75,000 Points Medal icon
    Very nice work, Its quite a complex thing to achieve, and certainly shows you have in depth knowledge of the entities used. Well done
    URL to post:


Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code


Key Authors


Fibbs avatar
Fibbs username pic Joined 11y ago
29,089 points Ranked 150th
24 medals 1 rare
  • 6 years a member Medal icon
  • Prefaber of the Month, June 2012 Medal icon
  • MiPper of the Month, June 2012 Medal icon
  • Prefaber of the Month, March 2013 Medal icon
  • Texturer of the Month, July 2014 Medal icon
  • Became a Studio Leader Medal icon

Fibbs avatar

Sign up to access this!
Sign up to access this!
Sign up to access this!


Sign up to access this!





  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+
  • 492 DLs
  • 11 Posts
  • 9ySubmitted
  • 3yModified


91 bScore
10 Rating

2 voters

Sign up to access this!

More from Submitter

More Other/Misc Prefabs tracking pixel