Lesson 6: Timers and Stopwatches
Timers and Stopwatches can be used to introduce a "time" element to your game or activity or to create delays in your circuits. You can use them, for example, to create a time limit to reach the end of your maze.
You can set the amount of time that your Timer will take to complete in the tooltip. You can also click on the shortcut from the Wire window.
If you are using a Stopwatch, this is also where you can set the mode:
Timer mode means that the Stopwatch will be used like a Timer, with a duration that you set and end at 0.
Stopwatch mode means that the time will start at zero and keep counting up as time goes on.
Timers and Stopwatches can be triggered in 2 ways :
1. If there is no input plugged into the Timer, you can start it by clicking on it.
2. You can control Timers with other furniture like Buttons and Switches by plugging wires into the corresponding input.
You can plug a wire in this input that will start the timer when a signal is received.
You can plug a wire in this input that will stop the timer when a signal is received.
While the Start and Stop input can be activated with a pulse signal from something like a Button, the Throttle input is a little different. The Throttle input will activate the Timer as long as there's a continuous signal that's being sent to it. For example, if you plug a Switch into the Throttle, the timer will only run if the Switch is On. If the Switch is turned Off, the Timer will pause until the Switch is turned back On.
Reset (Stopwatch only)
The Reset input will reset the Timer to its original state, ready to be started again.
Increase / Decrease / Time
Works with the new Wired Numbers to modify the time
Type: Continuous signal
The Active output will send a continuous signal to the connected furniture as long as the Timer is running.
Type: Pulse signal
The Complete output will send a pulse signal to the connected furniture when the Timer gets to the end of its time. (Note: If you are in Stopwatch mode, the Complete pulse signal will be sent when the time reaches the maximum possible value on the Timer).
Type: Pulse signal
The Start output is a pulse signal that will be sent when the Timer is started.
Type: Pulse signal
The Stop output is a pulse signal that will be sent when the Timer is stopped.
Works with new Wired Numbers to send the time as a number, in seconds
The main purpose of the Timers is to add a time component to your circuits. For example, it could easily be used to create a timed gate where players would have to hurry to get somewhere! Let's see how we could easily build one.
First, let's set up the different furniture we'll need to make our circuit. We'll need a Button (to start the timer), the Timer, and a Blockade.
Click on your Button furniture to see the Button's Outputs, and click on the Power Output A's socket to initiate a connection.
Drag the wire to the Timer. This will open the Timer's Inputs. Select which input you want the Button to activate. In this example, we want the Start input.
If you want, you can test your circuit so far! If you close the Edit Menu and click on the Button, you should see the wire light up as the signal is sent to the Timer and the Timer should start.
Next, let's set up the Timer (If you closed the Edit Menu to test your circuit, reopen it now). Select the Timer to see its Outputs. Now, we want the Blockade to receive power and be open while our Timer is running, so let's click on the Active output's socket.
Drag the wire to the Blockade, and since it has only one input, the Power Input A will be automatically selected.
Congratulations, you did it! If you followed every step correctly, the Blockade should be open for a certain amount of time when you press the Button. If you want, you can also adjust the time of the Timer to make it a bit more challenging!
Tune in for the next MasterClass all about Scoreboards!