Logic Gadgets: Timer


Name of gadget Timer
Section Logic & Processing
Number of Tweak pages 1
Author LadylexUK, QuietlyWrong
Last updated 24 Feb 2019 [Beta]


This gadget provides you with a timer, stopwatch, and pulse generator. You can use it to delay an event, run an event for a set time, calculate time taken for an event to occur,  and create a score. It is very versatile. It generates a pulse signal when the timer reaches a predetermined count. You can create a loop with it so you can create a pulse signal at a given interval. This is particularly useful in conjunction with the randomiser. In edit mode, the gadget itself has a progress bar on it to indicate its current position.

Example Tutorial (adapted from Media Molecule)

  1. Stamp a cube.
  2. Snap a grab sensor to it.
  3. Tweak the cube so that imp interaction is set to grab.
  4. Nudge the glow slider to 40%.
  5. Stamp a timer.
  6. Connect the timer finished (signal) output to the glow slider input on your cube.
  7. Connect the grabbed output on the grab sensor to the start timer input.
  8. Go to test mode.
  9. Grab the shape then let go.
  10. The shape will glow for 5 seconds then stop.

Tweak Menus

  1. Target Time
    1a. Input
    2b. Output
  2. Current Time
    2a. Input
    2b. Output
  3. Timer Type
  4. Start Timer
    4a. Input
  5. Timer finished (pulse)
    5b. Output
  6. Reset Timer
  7. Timer Output
    7b. Output
  8. Timer Finished (signal)
    8b. Output
  9. Power
  1. Target Time
    This is the length of time the timer will run for. Depending on the mode this will be what the timer counts up to or down from. The default is a count up to 5 seconds.
  2. Current time
    This allows you to read or change the current time count
  3. Timer Type
    • Count Up
      This setting makes the timer count up to the target amount
    • Speed
      This setting allows for the timer to run at different speeds depending on the strength of the input signal to 4a. This is useful if you want the player or an event to be able to delay the timer for a duration.
    • Positional
      This uses the input signal strength of 4a to determine a proportion of the timer target time to reach before it is regarded as finished. So a 40% signal will allow the timer to count up to 40% of its target time before it stops.
    • Count Down
      This setting makes the timer count down from the target amount to zero.
  4. Start Timer
    Wire a signal here to start the timer. Its signal strength can change the way the timer works depending on timer type selected. Note that a timer without anything wired into this input will start as soon as the scene starts.
  5. Timer finished (pulse)
    This sends out a pulse to say the timer has reached either the target amount or zero or percentage of target amount (depending on the mode)
  6. Reset Timer
    This sets the timer back to the start (either zero or the target amount, depending on the mode). Wire the Timer finished (pulse) to the reset input to get a loop. There is no need to wait until the timer is finished – it will take effect as soon as a new signal is sent to this input regardless of the timer’s position.
  7. Timer Output
    This produces an output that is the current time as a percentage of the target time. So with a target of 6 seconds, and the current time at 3 seconds, the output will be 50. You can use this to gradually change a slider as the time moves towards completion such as a light coming on.
  8. Timer finished (signal)
    This sends a continuous signal of 1 when the timer has reached either the target amount , percentage of target amount or zero (depending on the mode)
  9. Power
    This is where you turn the gadget on/off

Lex Tips


Useful Tutorials

Beginners Guide to the Timer


Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: