Tabletop Simulator

Tabletop Simulator

Not enough ratings
Timer 2.0 - Scripted Countdown Tool
   
Award
Favorite
Favorited
Unfavorite
Assets: Scripting
Tags: Misc
File Size
Posted
11.474 KB
17 Nov, 2016 @ 5:22pm
1 Change Note ( view )

Subscribe to download
Timer 2.0 - Scripted Countdown Tool

Description
A cube with a time display on 4 sides that counts down to 0 at the press of a button. Using DeJMan's delta concept, this tool will keep time more accurately than the original version, regardless of your frame rate. This is for people who want a countdown timer visible from all directions that is easy to reset and start again.

Features?
  • Easy to use: Click reset to reset the timer back to its starting time. Click one of the 4 side displays to start/pause the countdown. Press + or - while paused to increase/decrease the time. Note that this changes the current countdown as well as the starting time for the next.
  • Changes colors:The timer is dark grey when reset, green when counting down, grey when paused and red when at 0.
  • Scripting Example: I've commented each section the code and tried to organize it so someone learning Lua could follow along with what is being done. It is also an example of DeJMan's delta time formula being applied to a countdown directly.
  • Easy to modify: Even if you can't script, there is a section at the top to modify the starting time, the amount of seconds that the + or - buttons add/remove, and the colors the tool changes to. Modify it into something you want.
Popular Discussions View All (1)
1
23 Oct, 2020 @ 10:33am
Changing the timeCount, externally.
AJBruner77
6 Comments
lonefreak 18 Apr, 2020 @ 5:58am 
This one is simply perfect. Thank you so much for creating it.
Air_G 6 Apr, 2020 @ 2:51am 
It's perfect, thanks a lot! (and for all your work on tutorials etc. as well)
x3n d0g 24 Sep, 2018 @ 12:47pm 
I play in top-down view, which makes this timer (nice as it is) unusable. I could see in the script where I could move the time display buttons around and rotate them, even putting one on the top of the cube. But I don't know enough to make the cube itself big enough for that - or how to add a 5th time display button so that there could be one of the sides AND top. :/
MrStump  [author] 15 Jul, 2018 @ 7:18pm 
Adding the following 4 lines, outside of any functions, will add this.

function onPlayerTurn(player_color)
resetTimer()
pauseOrStart()
end
Virgilante 14 Jul, 2018 @ 8:51pm 
Is there a way to have it reset and begin countdown when it's a new player's turn?
JD 17 Feb, 2018 @ 8:06am 
Fantastic