Tabletop Simulator

Tabletop Simulator

Counter Stack Exploder
Crafunzio 20 Dec, 2022 @ 1:31pm
Repacking keyboard shortcut and with some off-set
Hello and thank you for your incredibly helpful code.

Here are two humble feature requests.

One is, being able to bind a keyboard press, the execution of the repack action, as it is possible with the exploding.

The second is, would it be hard to allow the tokens not to repack tidily? When they all align perfectly, they are less intuitive to count without exploding the stack, also due to a TTS limitation making them "too perfect" (see https://tabletopsimulator.nolt.io/1898 )

Many thanks either way!
< >
Showing 1-1 of 1 comments
Crafunzio 21 Dec, 2022 @ 5:19am 
I was able to repack the items in a way that looks more natural (to me!) by modifying this section of repack()

for i, o in ipairs(objs) do
if isCounter(o) then
offset=(0.5 - math.random() )/8
local pos = {
x = origin.x + offset,
y = 1.5+(i*0.25),
z = origin.z + offset,
}
o.setPositionSmooth(pos, false, true)
rotationoffset=(0.5 - math.random() )
o.rotate (Vector(0, rotationoffset, 0))
o.use_grid = true
o.use_snap_points = false
end
end

Thanks! :-D
< >
Showing 1-1 of 1 comments
Per page: 1530 50