La Comunidad de Modding - Desde 2001

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.
Promotional Content

Files

Posts

1–10 of 11
1
Páginas
  • 1
  • 2
Ir a la página:
  • 8y
    Archanor avatar
    Archanor username pic Joined 11y ago
    Offline
    126,663 points Ranked 22nd
    19 medals 1 legendary 2 rare
    • 10 years a member Medal icon
    • Reached 75,000 Points Medal icon
    • 6 years a member Medal icon
    • Trouble in Paradise Mapping Contest Entrant Medal icon
    • Became a Club Leader Medal icon
    • Reached 1,000 Points Medal icon
    I'm kind of making an economy system on a map I have in progress, and I'm wondering if this counter supports the ability to both add and subtract numbers?
    årgh avatar
    Mantra
    årgh
  • 8y
    Very nice! I like the best at countdown timer! These timers can be very useful!

    10

    Freezing out here... avatar
    Mantra
    Freezing out here...
  • 8y
    Spoz avatar
    Spoz Joined 12y ago
    Offline
    5,172 points Ranked 945th
    12 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    Posted by Fibbs
    Posted by Stavros Xanthis What tickrate is this entscripted for?
    Don't think it matters? Not sure what you mean though. I've only tested it on 100 tick. The timer goes off every second which adds to the counter, it should still go off every second even on other ticks, right?
    If its scripted for 66 tick, it'll run slower on 33 and faster on 100. As with 100t scripting, it'll run much slower on 33
  • 8y
    Fibbs avatar
    Fibbs username pic Joined 10y ago
    Offline
    29,089 points Ranked 147th
    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
    Posted by Stavros Xanthis What tickrate is this entscripted for?
    Don't think it matters? Not sure what you mean though. I've only tested it on 100 tick. The timer goes off every second which adds to the counter, it should still go off every second even on other ticks, right?
  • 8y
    Spoz avatar
    Spoz Joined 12y ago
    Offline
    5,172 points Ranked 945th
    12 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    What tickrate is this entscripted for?
  • 8y
    Fibbs avatar
    Fibbs username pic Joined 10y ago
    Offline
    29,089 points Ranked 147th
    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
    Posted by Bertrand_le_castor_de_Bell Pros: Coolest thing i've ever seen on the prefab list! I was looking for a timer with 3 digits for my hockey map... but you manage to gave explanation on how to put another digits (it worked even if I have 0 experience with logic_timer and logic_case). I'll see how my map will look with the timer (it's gonna go backward) and then I'll credit your work :D. Great work and skills there boy. Cons: None Improvements: None Notes: Amazing work
    I was hoping explaining it would help someone. That's really nice to hear, thank you. :D
  • 8y
    Pros: Coolest thing i've ever seen on the prefab list! I was looking for a timer with 3 digits for my hockey map... but you manage to gave explanation on how to put another digits (it worked even if I have 0 experience with logic_timer and logic_case). I'll see how my map will look with the timer (it's gonna go backward) and then I'll credit your work :D. Great work and skills there boy. Cons: None Improvements: None Notes: Amazing work

    10

    You want a piece of me boy!?
  • 9y
    ATIX avatar
    ATIX Joined 12y ago
    Offline
    2,276 points Ranked 2161st
    10 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    I will check into it later, Thx FFFFFFFFFFFFFFFFFFFFFFIBZ
    =[ATIXIUM]| || ||| | || ||| avatar
    Mantra
    =[ATIXIUM]| || ||| | || |||
  • 9y
    Fibbs avatar
    Fibbs username pic Joined 10y ago
    Offline
    29,089 points Ranked 147th
    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
    Posted by ATIX Yeah great job, any way you can do it backwards? I was just looking for a timer, that would start off on 45 seconds and go down til 0 for my nuke.
    Haven't thought this through but you could try setting the initial value of the left counter to 4 and the right to 5, then change the timer's output to subtract instead of add, and the output from the left counter to subtract as well. Then swap the OnHitMax outputs to OnHitMin, and vice-versa for OnHitMin. That's just thinking about it now, haven't thought the workings of it through properly, but if you can't get it working I'll see if I can.
  • 9y
    ATIX avatar
    ATIX Joined 12y ago
    Offline
    2,276 points Ranked 2161st
    10 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    Yeah great job, any way you can do it backwards? I was just looking for a timer, that would start off on 45 seconds and go down til 0 for my nuke.
    =[ATIXIUM]| || ||| | || ||| avatar
    Mantra
    =[ATIXIUM]| || ||| | || |||
1–10 of 11
1
Páginas
  • 1
  • 2
Ir a la página:

Embed

Compartir banner
URL de la Imágen:
Incrustar código HTML:
Código BB incrustado:
Markdown embed code:

Credits

Key Authors
Fibbs
Everything

Submitter

Fibbs avatar
Fibbs username pic Joined 10y ago
Offline
29,089 points Ranked 147th
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
Fibbs

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

Category

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 488 Downloads
  • 4,440 Views
  • 11 Posts
  • 9y Submitted
  • 3y Modified

Scores

91 bScore
10 Rating

2 voters

Sign up to access this!

¡Hey, tú! Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Rate: Rate mods and help them stand out.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

¡Deja de ser un mirón! Sign up now!

Already a Bananite? Iniciar Sesión

bcp.crwdcntrl.net tracking pixel