Tabletop Simulator

Tabletop Simulator

评价数不足
Timer 2.0 - Scripted Countdown Tool
   
奖励
收藏
已收藏
取消收藏
Assets: Scripting
标签: Misc
文件大小
发表于
11.474 KB
2016 年 11 月 17 日 下午 5:22
1 项改动说明 ( 查看 )

订阅以下载
Timer 2.0 - Scripted Countdown Tool

描述
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.
热门讨论 查看全部(1)
1
2020 年 10 月 23 日 上午 10:33
Changing the timeCount, externally.
AJBruner77
6 条留言
lonefreak 2020 年 4 月 18 日 上午 5:58 
This one is simply perfect. Thank you so much for creating it.
Air_G 2020 年 4 月 6 日 上午 2:51 
It's perfect, thanks a lot! (and for all your work on tutorials etc. as well)
x3n d0g 2018 年 9 月 24 日 下午 12:47 
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  [作者] 2018 年 7 月 15 日 下午 7:18 
Adding the following 4 lines, outside of any functions, will add this.

function onPlayerTurn(player_color)
resetTimer()
pauseOrStart()
end
Virgilante 2018 年 7 月 14 日 下午 8:51 
Is there a way to have it reset and begin countdown when it's a new player's turn?
JD 2018 年 2 月 17 日 上午 8:06 
Fantastic