Tabletop Simulator

Tabletop Simulator

Counter Stack Exploder
Crafunzio 20. dec. 2022 kl. 13:31
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!
< >
Viser 1-1 af 1 kommentarer
Crafunzio 21. dec. 2022 kl. 5:19 
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
< >
Viser 1-1 af 1 kommentarer
Per side: 1530 50