Results 1 to 12 of 12

Thread: Object.clone needs a callback

  1. #1

    Object.clone needs a callback

    Object.clone needs a callback just like spawnObject. Otherwise it's mostly useless.

    Or coroutines need parameters.

  2. #2
    Join Date
    May 2016
    Posts
    1,072
    Just an fyi, you can work around coroutines not having parameters.
    Code:
    function funcName(parameter)
        function funcName_routine()
            print(parameter)
            coroutine.yield(0)
            return 1
        end
        startLuaCoroutine(Global, "funcName_routine")
    end
    Clone having a calllback would be useful. As would being able to disable the "object spawning" noise as a variable (like what spawnObject could benefit from). I agree it is something that, at some point, could be improved.

  3. #3
    That works? I'll try that tomorrow.

    One of the things, that I find off-putting with scripting in Tabletop Simulator, is, that nothing works as I would expect it to work.

    Thanks, anyways.

  4. #4
    Flirting with trying to duplicate a card deck taken out of a bag so that if cards are accidently deleted from this deck (as always happens in TTS), the deck will retain its integrity. I'll have to agree with Banbury, nothing ever expects to work as you think it would.

    Question: Most online Lua tutorials have nothing to do with TTS. Where do you guys figure all this stuff out?

  5. #5
    Three days of experimenting and then asking stupid questions on the forum. That's how I do it.

    Seriously, I'm a software developer with some experience and TTS still leaves me stumped with simple stuff like that.

  6. #6
    Join Date
    May 2016
    Posts
    1,072
    @maximo, I've made a short series of guides specifically geared towards reaching Lua basics specifically for TTS, with the things I think people will need to use the most. Links to the 2 guides (and the final Functions guide with a collection of useful functions) can be found linked here.

    @Banbury, there is definitely a learning curve. Certain things require an understanding of how certain things happen (like how decks form, when they do, why they don't sometimes, etc). The forums are always willing to help of course =)

  7. #7
    Quote Originally Posted by MrStump View Post
    @Banbury, there is definitely a learning curve. Certain things require an understanding of how certain things happen (like how decks form, when they do, why they don't sometimes, etc). The forums are always willing to help of course =)
    It's more of an unlearning curve. I constantly have to work around TTS' limitations. Full featured LUA is a powerful language. But TTS strips away the best parts.

    But thanks for the help.

  8. #8
    Join Date
    Apr 2016
    Posts
    174
    Probably a good idea. You wouldn't want to join a server to play a game and find your hard drive wiped.

  9. #9
    Quote Originally Posted by Flolania View Post
    Probably a good idea. You wouldn't want to join a server to play a game and find your hard drive wiped.
    I'm not talking about missing libraries. It's basic stuff like the badly implemented coroutines, that irritate me. Or that every object has its own instance of LUA and can't interact with other objects normally. Or that I can't modularize my code and therefore can't reuse code between objects.

  10. #10
    We could really use dofile/loadfile (even if it could only access other scripts present in TTS, not the whole filesystem) and some simple web requests (e.g. POST). Debug library maybe? I think we're constrained a little too much for what safety requires at the moment.

  11. #11
    Quote Originally Posted by dzikakulka View Post
    We could really use dofile/loadfile (even if it could only access other scripts present in TTS, not the whole filesystem) and some simple web requests (e.g. POST). Debug library maybe? I think we're constrained a little too much for what safety requires at the moment.
    My thoughts, too. I have already tried to talk with Berzerk Games about it, but they keep ignoring it.

  12. #12
    Join Date
    May 2016
    Posts
    1,072
    Just because a suggestion has not been filled does not mean it was ignored. There are 2 devs who put out updates every couple of weeks and in that time, 3-5+ suggestions for major feature changes are made on this forum alone. They can't all get filled, but that never means its time won't come in the future.

    The best you can do is to state a clear usage case for WHY you want a feature, how it would improve TTS, etc. The original post to this thread was a good example, showing a clear usage and solutions that would fix it. =)

Similar Threads

  1. Spawn object callback parameters
    By Ajkiger1 in forum Scripting
    Replies: 3
    Last Post: 06-25-2017, 05:46 PM
  2. [SOLVED] Help with CLONE OBJECT?
    By Tragic in forum Scripting
    Replies: 1
    Last Post: 06-03-2017, 10:51 PM
  3. Replies: 9
    Last Post: 07-09-2016, 11:46 AM
  4. Callback Object ID
    By TattleTale in forum Scripting
    Replies: 7
    Last Post: 07-04-2016, 05:49 PM
  5. Replies: 2
    Last Post: 06-27-2016, 12:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •