Tabletop Simulator

Tabletop Simulator

View Stats:
How to pick up a single card in a splay?
Let's say I have 10 cards splayed out on the table so that I can see the edges of each card. ("Fanned out" in other words. ) I see a card among those that I want to grab. What I'd like to do is just grab that one card and nothing else. But TTS has me picking up every card above it as well. Or sometimes just a few of them. I'd like to just grab the one card.

One way I found to workaround this is to offset the cards more. But then the cards take up too much room on the table.

Is there a way to change a card's property to not do this (scripting?). I tried turning off "sticky" but that didn't make any difference.
< >
Showing 1-3 of 3 comments
Baryonyx Dec 16, 2020 @ 5:34am 
If you want to pick it into your hand, you can hover over the card and press 1.
Last edited by Baryonyx; Dec 16, 2020 @ 5:34am
azure.symmetry Dec 16, 2020 @ 8:52am 
To pick a single card from a deck, you have to drag and drop rapidly away from the deck. If you click during 1 second, you actually move the whole deck itself.
polytopia_bender Dec 16, 2020 @ 1:08pm 
Pressing 1 would draw the card, but I don't want to draw it. I want to grab it.

Moving rapidly works for when you're drawing the top card of a deck. But I'm not. I'm drawing from the middle of a splay.

This code did the trick. It calls Player.getHoldingObjects and .drop()s all but 1.

function onObjectPickUp(player, obj)

local holding = Player[player].getHoldingObjects()
if #holding == 1 or obj.tag ~= 'Card' then
return
end
local splay = holding[1].getTransformRight():normalized()

table.sort(holding, function(a, b)
return a.getPosition():dot(splay) > b.getPosition():dot(splay)
end)

-- drop all splayward objects
for i, c in ipairs(holding) do
if i > 1 then
c.drop()
local pos = c.getPosition()
pos.y = pos.y - 0.2
c.setPosition(pos)
end
end
end

< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Dec 15, 2020 @ 6:42pm
Posts: 3