Page 2 of 10 FirstFirst 1234 ... LastLast
Results 26 to 50 of 241

Thread: Scripting Features & Improvements

  1. #26
    Apologies for the multiple posts.
    Encountered an issue that halts me from progressing. It appears that any movement actions, apart from resetting the deck, are subject to be pulled by the hands.

    An example of this can be seen on the Blackjack demonstration; set your hand behind another players, and their hand will steal the cards as they are dealt to you.

    As is, I cannot find a way to control an object, once it has entered a hand.

    In addition to the previous suggestion to add easily accessed hand contents, a reworking of the hand-pulls, perhaps automatically disabling when a card is under script-motion, or a function to call to disable/enable hand interaction.

  2. #27
    Commands for:
    "Changes Joint settings on GameObject" (e.g. to start up a motor force that was not there previously).
    "Translates the GameObject toward the nearest snap-point in the axis direction given.";
    "Changes state of Change-Stated GameObject to the given change-state number.";
    "Creates Joint between GameObject and GameObject at given position.";
    "Deletes Joint on GameObject."

  3. #28
    I would like the ability to randomize objects within scripting zones (similar to how the functionality of a randomize zone).

  4. #29
    I'm currently looking for a way for each player to enter written material, as required for simultaneous ordering of units in games like Diplomacy. The submitted contents need to be private and editable for every player until all players are ready; then they need to switch to public and non-editable, simultaneously, for every player. I can't see any good way of doing this in TTS at the moment and the existing implementations of Diplomacy seem clunky.

    Programmatic access to the notebook could help, but I couldn't see anything in the API.

  5. #30
    Something I'd like to see: setRotationSpeed or the like, for games such as Roulette (And an accompanying "setMotion" that takes horizontal and vertical angles and a speed, for the ball)

    Currently the only rotation/movement things available are a single movement/rotation, and while this could work it's not quite optimal for what I'm looking for.

  6. #31
    Quote Originally Posted by Fevix View Post
    Something I'd like to see: setRotationSpeed or the like, for games such as Roulette (And an accompanying "setMotion" that takes horizontal and vertical angles and a speed, for the ball)

    Currently the only rotation/movement things available are a single movement/rotation, and while this could work it's not quite optimal for what I'm looking for.
    Clarification: This would set the speed and direction only once, then release it to the physics engine.

  7. #32
    Join Date
    Jul 2015
    Posts
    159
    Thanks for the feedback guys! We really appreciate it in the early stages are we are shaping the scripting system. Keep it coming!

  8. #33
    Others have already mentioned this, but I want to stress how important it is for all the potential users of scripting: we need a much bigger editing box, with adjustable font sizes and, even better, syntax highlighting. It's not even possible to see a typical line of code in its entirety in the current editing window.

  9. #34
    RE: Diplomacy orders, upthread.

    I managed to cobble something together with one tablet per player, pointed at an online text editor, and moving in and out of their hidden zones with scripting. A lighter solution would be nice.

    One residual problem is that the "Enter" key does not function as a newline creator, even when the tablet has focus. If text is created elsewhere and pasted into the tablet, it is possible to navigate up and down through the lines, but it is otherwise not possible to have multi-paragraph text.

    This should be very easy to fix, because the function of other keys like arrow keys is already changing on acquiring tablet focus.

  10. #35
    It would be nice if there were a form of the flip function that took a boolean indicating whether the result should be face up or face down.
    flip(true) would turn a token/card face up, or leave it alone if it was already face up
    flip(false) would turn it face down or leave it alone

    There should also be an isFaceUp() function. (Perhaps there is by another name, and I missed it.)

  11. #36
    Functions for buttons to:
    * change label
    * delete button
    * create more than on button per game object

  12. #37
    Join Date
    Feb 2016
    Location
    Ontario
    Posts
    3
    Quote Originally Posted by Arcuate View Post
    It would be nice if there were a form of the flip function that took a boolean indicating whether the result should be face up or face down.
    You should be-able to get that by checking the objects rotation. Just test the normal of the rotation. If it's downwards, then it's probably face down. (I'd have to test this to be sure, but seems plausible.)

  13. #38
    Quote Originally Posted by BlackDragonIV View Post
    You should be-able to get that by checking the objects rotation. Just test the normal of the rotation. If it's downwards, then it's probably face down. (I'd have to test this to be sure, but seems plausible.)
    Yeah sure, there are workarounds, but it would be nice not to worry about minor details for such a common operation. I think it will be quite common for a scripter to want to ensure something is face up or face down, rather then just making it the opposite of whatever it already is.

    Currently I am only flipping cards during setup, and I am simply copying the orientation of cards that are already in position, so it is not a problem for me.

  14. #39
    I'd like a feature that could present an announcement to players or a single player, somewhere near the middle of the screen (this could also be made into a normal chat command).

    Right now, the only way to announce things to players is to put something in the chat, which has two major problems:
    1) It isn't very noticeable, since it's small and in the corner of the screen
    2) There is a history of messages put in the chat window, which might not be ideal for some games.

    Since scripting does a lot of things on its own, it could be helpful to let players know what the script is doing, such as "Dealing Cards" or "Shuffling Deck" or "Red Player has bet 100".

    Also, unless I missed it, there is no way to draw or erase a hidden area with scripting.

  15. #40
    Waggles, thoroughly agree. Would be great to have a large text popup with configurable position, duration, font-size and RGBA color. Default would be auto-centered.

  16. #41
    First of all, I'm super excited to have scripting implemented! Most of the ideas I had previously were limited by some necessity for scripting, so now I can finally work on them!

    Quote Originally Posted by Banbury View Post
    Functions for buttons to:
    * change label
    * delete button
    * create more than on button per game object
    A lot of great points in this thread, but the button advancements stated in this post are what I would like to see, especially multiple buttons per object! It looks like it's just creating all of the buttons at the coordinates of the last button created. This is something that can be worked around by having dummy objects but would get very ugly very quickly...

    Keep up the good work!

  17. #42
    Two annoying things so far :
    * As it has been already said, the setRotationForGameObject function doesn't exists.
    * When you rotate an object with a custom model in game, it uses the origin coordinates of the model as pivot point but when you use a script, it rotate around its centro´d.

  18. #43
    One issue I have had with it on my Linux machine is that it saves non-text characters to the script and breaks it. So I have to edit the .json file manually to remove them. However I find this issue exists with all text input (image urls). It seems to "like" saving backspace characters.

  19. #44
    Join Date
    Feb 2016
    Location
    Sweden
    Posts
    77
    More tools for debugging, no silent exits pls

  20. #45
    Quote Originally Posted by TheLimeyDragon View Post
    One issue I have had with it on my Linux machine is that it saves non-text characters to the script and breaks it. So I have to edit the .json file manually to remove them. However I find this issue exists with all text input (image urls). It seems to "like" saving backspace characters.
    I have this same issue on my Macintosh OS X Yosemite 10.10.5

    Of all the suggestions that have been posted previously, I think the most important one is to improve the save/load game process.

    This is an enormous pain when trying out API functions that are sparingly documented, as others have pointed out already.

    The features in which I am most interested in are some functions that deal with dice, especially custom dice.

    Another important thing I think, is a way to set up timed functions, a la the javascript setTimeout() function. If necessary, I could figure out a way to do it using a counter on the update event handler, and a Table of function calls to make (with the time they should be run,) but really, that should be done in the underlying code, not in something an application level programmer should be doing.

  21. #46
    Quote Originally Posted by johnhelmuth View Post
    Another important thing I think, is a way to set up timed functions, a la the javascript setTimeout() function.
    If you intend to do anything like this, know that the coroutine.yield(0), and I assume update too, are framerate dependent. A better approach would probably revolve around using os.time (have confirmed that returns a value) , yielding until a sufficient time has passed (would get you to the nearest frame)

  22. #47
    Would like to add another suggestion: something along the lines of an onNewTurn() function. When ever someone clicks end turn, and it goes to the next person, you can trigger code to be activated.

    Would also like hooks into the host/mod features. Example use:
    automod = {12345678910111213, 02345678910111213}
    function OnJoin() if automod.contains(PlayerID) then setPlayerAsMod(playerID) end
    where playerID is the SteamID of the person joining.
    Last edited by Irbystadt; 02-22-2016 at 10:19 AM. Reason: autohost > automod

  23. #48
    Join Date
    Jul 2015
    Posts
    159
    Quote Originally Posted by johnhelmuth View Post
    I have this same issue on my Macintosh OS X Yosemite 10.10.5
    We'll probably have to check the pasted string and strip out all of these characters that NGUI doesn't recognize. Do you guys have a list of them?

  24. #49
    Delete and/or Backspace seem to be the problematic ones

  25. #50
    I was wondering if anyone else had met this issue:

    I am trying to count resources on a player mat. I used function
    onObjectEnterScriptingZone(zone, object)
    and it called a function which used a line like:
    local objects = getObjectsInScriptingZone(zone)
    and then proceeded to count the objects. I did the same when an object left the zone, and used it to update the hover description of the player's mat.

    The problem I met is that the list of objects was what it had been just before the object entered or left, so I was always out of date, counting the object as present when it just left and as absent when it just arrived. I had to write a more complicated function with a reference to the entering/leaving object and a boolean saying whether it was entering or leaving, and then count or subtract that object as well as iterating through the list of objects.

    The final code seems to work just fine, but it's messy. It would make more sense to me for the function
    onObjectEnterScriptingZone(zone, object)
    to be called after the list of objects was up to date. Better still, offer two versions of the function, one called onObjectAboutToEnterScriptingZone(zone, object)
    and one called
    onObjectEnteredScriptingZone(zone, object).

    The current version of onObjectEnterScriptingZone(zone, object) matches the former, whereas the latter would seem more useful for simple things like counting.

    Of course, it's possible I have managed to confuse myself, but has anyone met this?

Page 2 of 10 FirstFirst 1234 ... LastLast

Posting Permissions

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