Search:

Type: Posts; User: dzikakulka

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. After you .takeObject something it takes some...

    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...
  2. This is a spam paste from here:...

    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...
  3. Replies
    2
    Views
    131

    @LordAshes It's just spam (ad spam disguised as...

    @LordAshes
    It's just spam (ad spam disguised as a post), forum is full of it lately.
  4. Replies
    4
    Views
    158

    It is documented, setLock here:...

    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...
  5. Replies
    4
    Views
    158

    Through scripting locking is controlled with...

    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.
  6. Triangulate all the faces on your model and make...

    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 :)
  7. Replies
    4
    Views
    265

    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?
  8. 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()
    ...
  9. Replies
    4
    Views
    213

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

    It's probably your button defaulting to some huge size obstructing everything in view...
  10. 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...
  11. Replies
    2
    Views
    181

    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
  12. Replies
    1
    Views
    133

    There is...

    There is
    https://api.tabletopsimulator.com/event/#onobjectentercontainer
  13. Replies
    1
    Views
    106

    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.
  14. Replies
    1
    Views
    112

    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,...
  15. Replies
    2
    Views
    151

    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:...
  16. 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,...
  17. 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...
  18. Replies
    7
    Views
    343

    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 =...
  19. Replies
    7
    Views
    343

    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 =...
  20. Replies
    7
    Views
    343

    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...
  21. 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...
  22. 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...
  23. Replies
    4
    Views
    348

    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...
  24. 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.
  25. 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...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4