Tutorials
Count Down Timer
Count Down Timer Tutorial
Written By Slutty_hoe
If you have any problems during this tutorial please do not hesitate to either pm me (slutty_hoe) or email me slut-ty-hoe[at]hotmail[dot]com or post a reply
This is a tutorial on how to make a visible in game counter to display any amount of time
This is a fairly long but easy if you are ok with the input output system.
The only hard part is setting each individual number
This tutorial can be used in any source mod as long as it has Func_brush, Logic_relay and a way to trigger it.
First make a room in which to place your countdown timer (I’ve made my big and added a door to it for the example map reasons.)
Add a black background for which the countdown timer will sit (optional)

Create a red colored brush (red texture with the example map) and chop off the ends (this is purely to make it look better doesn’t need to be done) Form the brushes into a shape of a digital clock 8.

Copy and paste it 4 times along side each other and add the little dots

Go to the right hand side “8” and select the top brush. Make it a func_brush and call it count_down_digit1_a (can be changed this just keeps it neat and logical for later on)

Now name the rest going from left to right up to down.

You should now have 7 func_brush
count_down_digit1_a
count_down_digit1_b
count_down_digit1_c
count_down_digit1_d
count_down_digit1_e
count_down_digit1_f
count_down_digit1_g
Depending on how long you want your counter to go for (mines going for 1 minute or 60 seconds) name the next digit like the other one but changing count_down_digit1_a
to count_down_digit2_a

(This is showing the digit number and the letter)
Now I want the timer to when it’s not counting down the time to display all zeros. So delete the middle of the unused numbers, the other 2 number middles select press alt + enter, go to start disabled, and change it to yes.

Now I will quickly setup the button to trigger the start of the countdown. (You can have it triggered by something else but I won’t cover that in this tut it’s just the same output on something else) Ok Setup the button to your liking and go to outputs
Now we want.
My output named: OnPressed
Target entities: Count_down
Via This input: Trigger
Also tick fire only once

And if you’re triggering something after the countdown
My output named: OnPressed
Target entities: Door
Via This input: Open
After a Delay: 60

Now here comes the real fun part. I’m not sure if this is the best way to do it but it’s a way to do it and it does work.
Make 10 logic_relays
Name 1 of them each
count_down_digit1_0
count_down_digit1_1
count_down_digit1_2
count_down_digit1_3
count_down_digit1_4
count_down_digit1_5
count_down_digit1_6
count_down_digit1_7
count_down_digit1_8
count_down_digit1_9

Open up count_down_digit1_1
Go to the output and add
My output named: OnTrigger
Target entities: count_down_digit1_a
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit1_b
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit1_c
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit1_d
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit1_e
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit1_f
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit1_g
Via This input: Enable
Now select them all and press copy. This just makes it easy to setup the rest of them

Ok now because we want this to make the number one we are going to need to make only the 2 upright brushes to enable. So if you remember what we named each individual brush we are only going to need count_down_digit1_c and count_down_digit1_f so select the rest of them and change enable to disable. Press apply.

What we just told it to do will make it once triggered look like this

Ok so if you’re a little lost I’ll explain what this is doing if you’re not go to the next paragraph. What we are doing is setting up just pre configured outputs so later on we will have a nother logic_relay to trigger all those logic_relays. When each logic_relay is triggered it will make what we set to enable to show up and what we set to disabled to disappear. So if we triggered count_down_digit1_1 it will make all the other red parts disappear that we don’t wont up there. It’s confusing I know but hang on and you will start to see.
Now we have to setup the rest of the digits. Open up number count_down_digit1_2
Go to the output section and paste in all the enables. (this is why I told you to do that, It just makes it a heck of a lot easier). Now for the number 2 we want count_down_digit1_b and count_down_digit1_f to be disabled. Select those 2 and set it to disabled.

In game it will look like

Ok now keep doing so for the rest of the numbers. (I have kindly posted pictures of both the number and the output system. And Ignore the top of the entity name I have managed to stuff it up its still correct in order going 3,4,5,6,7,8,9,0)















See lots of fun. Now we need to do it again 6 more times =D (horray)
Make 6 more logic_relays
Name them
count_down_digit2_0
count_down_digit2_1
count_down_digit2_2
count_down_digit2_3
count_down_digit2_4
count_down_digit2_5
Now there’s 2 ways of doing this you can either go to the corresponding number on the other ones and copy it and change the digit number or you can do it how we did those. But I’m going to assume (after doing all of those) you know how to setup the 6 logic relays there
Well heres the one for count_down_digit2_1
My output named: OnTrigger
Target entities: count_down_digit2_a
Via This input: Disable
My output named: OnTrigger
Target entities: count_down_digit2_b
Via This input: Disable
My output named: OnTrigger
Target entities: count_down_digit2_c
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit2_d
Via This input: Disable
My output named: OnTrigger
Target entities: count_down_digit2_e
Via This input: Disable
My output named: OnTrigger
Target entities: count_down_digit2_f
Via This input: Enable
My output named: OnTrigger
Target entities: count_down_digit21_g
Via This input: Disable
Ok that’s about 2/3rd’s of the tutorial done and wasn’t it fun.
Now we just have to make it setoff when we want it to.
Now we need 3 more logic_relays you can just make one but this is the neat and tidy way.
Add them in and call them
count_down
count_down_digit1
count_down_digit2
Now go to the output of count_down and add:
My output named: OnTrigger
Target entities: count_down_digit1
Via This input: Trigger
After a delay: 0
My output named: OnTrigger
Target entities: count_down _digit2
Via This input: Trigger
After a delay: 0
My output named: OnTrigger
Target entities: count_down_digit1
Via This input: Trigger
After a delay: 10
My output named: OnTrigger
Target entities: count_down_digit1
Via This input: Trigger
After a delay: 20
My output named: OnTrigger
Target entities: count_down_digit1
Via This input: Trigger
After a delay: 30
My output named: OnTrigger
Target entities: count_down_digit1
Via This input: Trigger
After a delay: 40
My output named: OnTrigger
Target entities: count_down_digit1
Via This input: Trigger
After a delay: 50

Ok that’s that done. So what that does is the button will trigger that which will trigger the number to run through there cycle once we have set it up.
Ok now open up cound_down_digit1 and add these outputs
My output named: OnTrigger
Target entities: count_down_digit1_9
Via This input: Trigger
After a delay: 0
My output named: OnTrigger
Target entities: count_down_digit1_8
Via This input: Trigger
After a delay: 1
My output named: OnTrigger
Target entities: count_down_digit1_7
Via This input: Trigger
After a delay: 2
My output named: OnTrigger
Target entities: count_down_digit1_6
Via This input: Trigger
After a delay: 3
My output named: OnTrigger
Target entities: count_down_digit1_5
Via This input: Trigger
After a delay: 4
My output named: OnTrigger
Target entities: count_down_digit1_4
Via This input: Trigger
After a delay: 5
My output named: OnTrigger
Target entities: count_down_digit1_3
Via This input: Trigger
After a delay: 6
My output named: OnTrigger
Target entities: count_down_digit1_2
Via This input: Trigger
After a delay: 7
My output named: OnTrigger
Target entities: count_down_digit1_1
Via This input: Trigger
After a delay: 8
My output named: OnTrigger
Target entities: count_down_digit1_0
Via This input: Trigger
After a delay: 9

Ok done. Last thing to do is open cound_down_digit2 and add in outputs
My output named: OnTrigger
Target entities: count_down_digit2_5
Via This input: Trigger
After a delay: 0
My output named: OnTrigger
Target entities: count_down_digit2_4
Via This input: Trigger
After a delay: 10
My output named: OnTrigger
Target entities: count_down_digit2_3
Via This input: Trigger
After a delay: 20
My output named: OnTrigger
Target entities: count_down_digit2_2
Via This input: Trigger
After a delay: 30
My output named: OnTrigger
Target entities: count_down_digit2_1
Via This input: Trigger
After a delay: 40
My output named: OnTrigger
Target entities: count_down_digit2_0
Via This input: Trigger
After a delay: 50

Last thing I swear. This is just to make it look like a countdown timer. Select the two middle dots and make them a func_brush call them cound_down_dot
Now make 2 logic_timers and a logic_auto
For the logic timers set re fire interval to 2
Make 1 of the logic_timers to have an output of
My output named: OnTimer
Target entities: count_down_dot
Via This input: Enable
After a delay: 0
Name The other logic_timer Timer and set start disabled to yes. Add output of
My output named: OnTimer
Target entities: count_down_Dot
Via This input: Disable
After a delay: 0
Now go to your logic_auto and add an output of
My output named: OnMapSpawn
Target entities: Timer
Via This input: Enable
After a delay: 1
CONGRATULATIONS!!!!!
Be proud of yourself you just went through possibly the longest tutorial ever but I doubt that. Now compile your map and test if it works (hopefully it will other wise just chuck a fit =O)
What should happen is when you press the button it starts the counter and when the counter hits 0 the door should open. I don’t know where you want this in your level you could possibly use it as a stand of thing for 5 minutes and its just telling you how long you have left. But this is how I have done it probably not the best way but it is a way to do it. Have fun mapping.
Example Map
Click here
Here’s a video from my example map
http://www.youtube.com/watch?v=WomRy0U7VqU
