Tabletop Simulator

Tabletop Simulator

Not enough ratings
Simple Turn Timer
   
Award
Favorite
Favorited
Unfavorite
Assets: Scripting
Tags: Misc
File Size
Posted
Updated
8.530 KB
7 Feb, 2017 @ 8:00am
8 Feb, 2017 @ 1:51pm
3 Change Notes ( view )

Subscribe to download
Simple Turn Timer

Description
I did a quick search and didn't see one of these on the workshop. If I'm wrong, I can take it down.

Basically it's just a simple turn timer which starts counting down at the start of a player's turn. Time is adjustable with the arrow buttons.

You can also set it to teleport in front of players' hands by changing the boolean variable 'teleport' from false to true. The change doesn't take effect on the clock that already exists, but you can copy/paste a new one or save to chest and spawn from there, and the change will be in effect on the new one.
6 Comments
darbs 11 Mar, 2019 @ 10:16pm 
@static

--[[ Turn timer scripted by Skor. Timer starts going UP on turn start. --]]

teleport = true
teleportdistance = 7


function onPlayerTurnStart(pl, prevpl)
self.Clock.startStopwatch()

if teleport then
self.setPosition({Player[pl].getPlayerHand().pos_x + (Player[pl].getPlayerHand().trigger_forward_x * teleportdistance), Player[pl].getPlayerHand().trigger_up_y, Player[pl].getPlayerHand().pos_z + (Player[pl].getPlayerHand().trigger_forward_z * teleportdistance)})
self.setRotation({Player[pl].getPlayerHand().rot_x + 90, Player[pl].getPlayerHand().rot_y, Player[pl].getPlayerHand().rot_z})
end
end


function doNothing()
end
[SiRe] Static 10 Feb, 2019 @ 11:39pm 
@Skor Would you be able to make a version of this that counts UP for each player's turn instead of down?

For most games I'm not as interested in putting a hard limit on each player's turn as I am in tracking exactly how long their turn is taking.
Emtu 8 Feb, 2017 @ 1:58pm 
Awesome. Yeah, my issue is people taking far too long to take their turns in Munchkin, causing games to run 3-4 hours or even more.
Skor  [author] 8 Feb, 2017 @ 1:45pm 
And updated. I added a boolean variable at the top of the script which is set to false by default. Change it to true if you want it to teleport. The change doesn't take effect on the already spawned one, but you can copy/paste a new one or save to chest and spawn from there and the change will be in effect on the new one.
Skor  [author] 8 Feb, 2017 @ 12:57pm 
That's what made me think of making this - people taking way too long to take their turns in Catan games, when they make a request for trade and wait like 30+ seconds for someone to bite... and then repeating the process with every other resource! I thought it might be nice to set a time limit on turns or something, so I scripted this. I haven't actually used it yet though.

I could probably add a few lines to teleport it around based on the players' hand locations. I would have the lines commented out by default, but you could just remove the comment tags in the script.
Emtu 8 Feb, 2017 @ 12:39pm 
Ooh. A way to automatically move this around the table (like the Turn Tracker) would be nice. I may poke at this and work on blending the mods, to encourage people to GET ON WITH IT.