Tabletop Simulator

Tabletop Simulator

Not enough ratings
Shuffle Players Button
   
Award
Favorite
Favorited
Unfavorite
Number of Players: 2, 3, 4
Assets: Scripting
Tags: Misc, 4+, Templates
File Size
Posted
Updated
19.345 KB
16 Mar, 2017 @ 6:09am
16 Mar, 2017 @ 6:23am
4 Change Notes ( view )

Subscribe to download
Shuffle Players Button

Description
A button, which when pressed will swap around the players currently seated at the table.

[www.paypal.com]
16 Comments
CaptainTenille 10 Mar, 2021 @ 10:08am 
Note: I tried changing to this line of code, but it ends up putting someone into Black and not moving them:

changed from:
local ranColours = {}

to:
local ranColours = {"Red","Green","Yellow","Blue","Purple","Brown"}

...now if I can just get that last player out of Black
CaptainTenille 10 Mar, 2021 @ 10:05am 
This only swaps the player colors that are seated. Is there a way to alter this to place the players into randomly selected seats of every possible seat, including the one that they were seated in, or ones that nobody was seated in? So, for example in a table with 6 seats, can 4 players be switched to any of the 6 available seats (i per seat obviously).
ChizBallz 2 May, 2018 @ 9:26pm 
How to make this so that it doesn't say black has to be seated to work? Can it check for grey instead.
HOLY-BG 12 Feb, 2018 @ 11:53am 
WWW Image Error: Couldn't connect to server.
Markimus  [author] 4 Jul, 2017 @ 3:30am 
Yep. I've been thinking of revisiting this and replacing the Black seat with a Grey seat. I haven't got round to it yet.
MrStump 3 Jul, 2017 @ 3:52pm 
With the new ability to get Grey players, you can just record everyone's steam_id, then kick everyone to grey, then seat the players from grey by going through all grey players and finding their stead_id to seat them.

Or you can swap seats by booting someone to grey, moving someone to their seat and moving the grey booted person into tho thief's seat.
Markimus  [author] 19 May, 2017 @ 5:17pm 
Hmm, alright. I prefer the Black seat to always be used as a vacant space.
Lost Savage 19 May, 2017 @ 5:05pm 
function findUnusedColor()
---local checkList = {'Brown', 'Teal', 'Black', 'White', 'Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Purple', 'Pink'}

---for i, playerColor in ipairs(checkList) do
------if not Player[playerColor].seated then
---------return playerColor
------end
---end
end
Lost Savage 19 May, 2017 @ 5:02pm 
It finds an unseated player using the 10 normal colors + black. One of them will always be free.
Markimus  [author] 19 May, 2017 @ 4:57pm 
If there's a full table, how will you shuffle all the players without it erroring out?