Search:

Type: Posts; User: dzikakulka

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    115

    I'm not really sure I understood the question...

    I'm not really sure I understood the question right, which variable exactly from that bag script you want accessible in some other place?
  2. obj.getCustomObject simply returns a table of...

    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()
    ...
  3. Replies
    4
    Views
    70

    It's probably your button defaulting to some huge...

    It's probably your button defaulting to some huge size obstructing everything in view...
  4. No variables are shared between scripts (Global...

    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...
  5. Replies
    2
    Views
    57

    XML UI can create elements on object-space (when...

    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
  6. Replies
    1
    Views
    50

    There is...

    There is
    https://api.tabletopsimulator.com/event/#onobjectentercontainer
  7. Replies
    1
    Views
    35

    This is the way to go. Don't worry about its...

    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.
  8. Replies
    1
    Views
    31

    It's only possible by doing "bag.getJSON()" and...

    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,...
  9. Replies
    2
    Views
    56

    You can make objects hidden (like in a hand zone,...

    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:...
  10. It probably won't be fixed since (afaik) it's a...

    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,...
  11. You probably can work around it for now using...

    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...
  12. Replies
    6
    Views
    144

    Easiest way to save data is to serialize a table...

    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 =...
  13. Replies
    6
    Views
    144

    If you're not adding/removing buttons at runtime...

    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 =...
  14. Replies
    6
    Views
    144

    That script snippet you pasted doesn't really...

    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...
  15. If "card.nickname" and "search_param" are the...

    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...
  16. https://kb.tabletopsimulator.com/getting-started/c...

    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...
  17. Replies
    4
    Views
    231

    If you have a JSON in a format like TTS uses for...

    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...
  18. I've seen people having this issue, afaik you...

    I've seen people having this issue, afaik you basically have to setPosition it out of the hand and then setPositionSmooth from there.
  19. Set to uninteractable and disable their...

    Set to uninteractable and disable their MeshRenderer and MeshCollider (maybe messed up the names) through the component api (https://api.tabletopsimulator.com/component/) could achieve just that, I...
  20. Replies
    1
    Views
    212

    [SUPPORT] I think if you'd run the TTS Mod Backup tool on...

    I think if you'd run the TTS Mod Backup tool on your save, it would try to download all the assets inside and show you which failed (404'd).
  21. Moonsharp (Lua emulator written for C# that TTS...

    Moonsharp (Lua emulator written for C# that TTS uses for running scripts) does not allow sharing functions between "script objects", and currently every game object and Global are separate scripts....
  22. Replies
    2
    Views
    273

    board.getRotation()

    board.getRotation()
  23. Replies
    2
    Views
    285

    The fact that functions can't be shared between...

    The fact that functions can't be shared between scripts is *exactly* a moonsharp limitation, see below :)
    https://groups.google.com/d/msg/moonsharp/lfjnxbPatRM/YTLlc-6ZCAAJ

    So we're pretty much...
  24. Lua aims to have very minimal set of built in...

    Lua aims to have very minimal set of built in functions (often called "batteries not included"), but existing facilities make standard stuff like trim (with str:match), split (with str:gmatch) or...
  25. @RayH If you're creating single Card objects...

    @RayH

    If you're creating single Card objects and aggregating them into a deck later, you can pass a table of parameters, including name, to its creation like


    local card = Decker.Card(asset,...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4