Bleh, Moonsharp weirdness. Fixed in https://github.com/Berserk-Games/Tabletop-Simulator-Lua-Classes/pull/6
Now we wait for a merge ;)
PS. I think there's no option to make this a clickable link?...
Type: Posts; User: dzikakulka
Bleh, Moonsharp weirdness. Fixed in https://github.com/Berserk-Games/Tabletop-Simulator-Lua-Classes/pull/6
Now we wait for a merge ;)
PS. I think there's no option to make this a clickable link?...
You can get that info from card.getJSON(). It will contain both face/back links and a row/column number concatenated as "CardID" IIRC. Log the thing and you'll figure it out.
After you .takeObject something it takes some time to travel to its destination. You need to pass your desired position/rotation to its params, like e.g.
-- White Player
params.index = 1...
This is a spam paste from here: https://www.reddit.com/r/learnprogramming/comments/7l309a/what_is_the_differene_between_script_and_program/drj4xjf/
Most likely to be edited with ad links like all...
@LordAshes
It's just spam (ad spam disguised as a post), forum is full of it lately.
It is documented, setLock here: https://api.tabletopsimulator.com/object/#set-functions and interactable here: https://api.tabletopsimulator.com/object/#member-variables
Lock is what happens when...
Through scripting locking is controlled with "obj.setLock(bool)" and read with "obj.getLock()". Don't ask me why one is property and the other a method tho.
Triangulate all the faces on your model and make sure you set them to smooth/sharp edges and smooth/flat faces where you need it :)
I'm not really sure I understood the question right, which variable exactly from that bag script you want accessible in some other place?
obj.getCustomObject simply returns a table of parameters (same stuff you'd set via UI after spawning some custom object. You can log it to inspect its structure, e.g.
function onLoad()
...
It's probably your button defaulting to some huge size obstructing everything in view...
No variables are shared between scripts (Global and each object have separate script instances). You can use obj.setVar/getVar/setTable/getTable/call (and with Global in place of obj) to exchange...
XML UI can create elements on object-space (when inside object xml) and on screen-space (when inside Global.xml), see some example here: https://api.tabletopsimulator.com/ui/introUI/#example-ui
There is
https://api.tabletopsimulator.com/event/#onobjectentercontainer
This is the way to go. Don't worry about its performance, it's just an array of tables with iterally two strings and a number inside.
It's only possible by doing "bag.getJSON()" and inspecting its output. You can't check out objects inside bags using the regular Object api since thiss stuff does not exist while inside a container,...
You can make objects hidden (like in a hand zone, e.g. hidden card face) or invisible (like in a hidden zone) using a set of functions documented here:...
It probably won't be fixed since (afaik) it's a direct API to Unity cast functions, Physics.ShpereCast in this case. In Unity, to do a "motionless sphere case" you would use Physics.OverlapSphere,...
You probably can work around it for now using spawnObjectJSON instead. Take a look how custom tile JSON looks (e.g. in the save file) and redo that structure as a table in TTS, you should be able to...
Easiest way to save data is to serialize a table and return it in onSave, try this snippet (stolen from https://api.tabletopsimulator.com)
data_table = {
answer = 42,
catName =...
If you're not adding/removing buttons at runtime too (which would make this harder), you could simply save the latest label under a button index in a dedicated table, like e.g.
myCard =...
That script snippet you pasted doesn't really mean anything, it just assigns some variables holding who-knows-what. First thing first, are you changing button labels at runtime? Typically they're...
If "card.nickname" and "search_param" are the strings you compare, you can do
if card.nickname:lower() == search_param:lower() then
for a case insensitive compare (str:lower() returns str...
https://kb.tabletopsimulator.com/getting-started/chat-rules/
2. Stay on topic. Finding and discussing games.
Consequences: Failure to adhere to the above rules can result in temporary removal...
If you have a JSON in a format like TTS uses for storing objects (you can inspect a simple save to see how single objects are represented inside), you can spawn it super easily using spawnObjectJson...