Tabletop Simulator

Tabletop Simulator

Zbyt mało ocen
Timer - Scripted Countdown Tool
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Assets: Scripting
Tagi: Misc
Rozmiar pliku
Zamieszczono
Zaktualizowano
12.057 KB
23 maja 2016 o 13:48
23 maja 2016 o 16:19
Listy zmian: 2 ( zobacz )

Zasubskrybuj, aby pobrać
Timer - Scripted Countdown Tool

Opis
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).
Komentarzy: 5
IrishCarBomb 10 kwietnia 2020 o 9:40 
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 września 2016 o 5:05 
You could use the name of the cube as the number of seconds it uses?
MrStump  [autor] 1 lipca 2016 o 19:21 
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 lipca 2016 o 18:48 
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 maja 2016 o 4:16 
Great work.