Tabletop Simulator

Tabletop Simulator

Not enough ratings
Timer - Scripted Countdown Tool
   
Award
Favorite
Favorited
Unfavorite
Assets: Scripting
Tags: Misc
File Size
Posted
Updated
12.057 KB
23 May, 2016 @ 1:48pm
23 May, 2016 @ 4:19pm
2 Change Notes ( view )

Subscribe to download
Timer - Scripted Countdown Tool

Description
UPDATE: I have gone back and taken another run at this project. The new version, found here, is able to keep accurate time regardless of your framerate. It is also more customizable.

A count-down timer, scripted in LUA. It can be viewed from all sides. The script is part of the base object, so so save a copy of it to your chest to use the timer with any of your favorite Tabletop games.

A reset button on top makes it easy to... well... reset. Clicking any of the side buttons causes it to start/stop countdown. It turns red to highlight when time has run out, and also publishes to chat (which can be disabled in the code).

I have included an index card in the save with further details.

UPDATE:
I have added a + and a - button to the front of the timer. Use these to increase or decrease the starting time by 10 seconds a click. No more editing the LUA (convenient for using this inside workshop files).
5 Comments
IrishCarBomb 10 Apr, 2020 @ 9:40am 
Mr.Stump, I LOVE your work! Is there any way you could make this timer play a sound at the end of the time? (maybe the buzzer sound from your awesome buzzer?)
Markimus 11 Sep, 2016 @ 5:05am 
You could use the name of the cube as the number of seconds it uses?
MrStump  [author] 1 Jul, 2016 @ 7:21pm 
I added some of that functionality for ya. When you spawn the timer, it will still be black. If you change the color and start the timer, it will stay that color unless you load the table or use undo. Clicking reset prior to starting the timer at all will reset the color to black.

The reason is because I didn't want this timer to have memory functionality. I've used it before, but for something like timer color it feels like a little much (from a scripting standpoint). If you want to add the functionality and post an improved version of my timer, I am ok with that =) I just ask for a credit.
Bravado 1 Jul, 2016 @ 6:48pm 
I really like this bit of scripting! Thank you for making it available for everyone!

While it's possible to change the color of the cube, resetting the timer also resets the cube to black. If you revisit this project, can you see if it can be coded to determine and save the cube's current color when it's reset?
darleth 24 May, 2016 @ 4:16am 
Great work.