YuukoC Posted July 19, 2019 Share Posted July 19, 2019 hello, i want to know if can i get some help with a simple color change script that works like this: -touch the object -menu appears with the colors p/e: black, white, blue, green,etc... -i choose the color -object color changes that's all, just simple, because i already made it worth with avsitter but i want one that works with a touch, not after i sit on it. Link to comment Share on other sites More sharing options...
Estelle Pienaar Posted July 19, 2019 Share Posted July 19, 2019 (edited) Hi YuukoC, by the way you break up the desired actions of your script, I guess that you don't have any LSL knowledge so far. This forum is for scripters to help each other with their projects. If you want someone to script you such a color change script, you need to ask your question in the in-world employment forum. If you want to learn to create such a script yourself, I would recommend to start with the LSL101 tutorial (links in the box on the right). In your script you need to call the function llDialogue in the event handler "touch_start". You will find all the necessary information here but it might be a bit overwhelming for a first scripting project: http://wiki.secondlife.com/wiki/Lldialog Edited July 19, 2019 by Estelle Pienaar 1 Link to comment Share on other sites More sharing options...
Fenix Eldritch Posted July 19, 2019 Share Posted July 19, 2019 9 hours ago, YuukoC said: that's all, just simple, because i already made it worth with avsitter but i want one that works with a touch, not after i sit on it. If you've already gotten it all working when an avatar sits on the object, then you can take that working code and move it into a touch_start event instead of the changed event. 1 Link to comment Share on other sites More sharing options...
Qie Niangao Posted July 19, 2019 Share Posted July 19, 2019 9 hours ago, YuukoC said: ... i already made it worth with avsitter but i want one that works with a touch, not after i sit on it. This actually makes it a bit tricky. You wouldn't really want to pop up a separate script's dialog when somebody is sitting on the object, so you kinda want one script that responds both to the avsitter menu (presumably via a link_message event) and to touch when the toucher is not a sitter. Unfortunately, avsitter doesn't seem to provide any facility to make that particularly easy -- see the response to this question in their FAQ. 1 Link to comment Share on other sites More sharing options...
Estelle Pienaar Posted July 19, 2019 Share Posted July 19, 2019 (edited) 15 minutes ago, Qie Niangao said: so you kinda want one script that responds both to the avsitter menu (presumably via a link_message event) and to touch when the toucher is not a sitter I understood the OP in a way that he wants to have a generic "touch event" script that replaces the "sit event" script of AV sitter for the exclusive use of color changing objects. But for the sake of the argument: In your use case, Qie, I would propose to create a seperate script that only executes if the avatar who touches the object is at the same time not sitting on it. Then the scripts for the color change cannot run similtaniously and everything should be fine? Edited July 19, 2019 by Estelle Pienaar 3 Link to comment Share on other sites More sharing options...
Qie Niangao Posted July 19, 2019 Share Posted July 19, 2019 That would definitely work, but I was worrying about preserving the current color-while-seated ability, while also obsessing that ideally there should be one piece of code that does the color changing, so it can be maintained in one place (not that this is so complex that it really matters). Seems likely that the OP already has a user-supplied script that AVsitter invokes via link_message specific to the color menu buttons, so it may be just as easy to add a touch_start handler that does the whole dialog thing so its listener can call a color-change function that can be shared with the link_message handler. As Fenix mentioned, the same code should be pretty easy to adapt regardless of the triggering event. The "tricky bit" is that AVsitter by default only interacts with sitters, and has a separate "AVmenu" functionality for non-seated applications using the same AVpos configuration notecard but can't coexist in the same link as the AVsit scripts. 1 Link to comment Share on other sites More sharing options...
YuukoC Posted July 19, 2019 Author Share Posted July 19, 2019 Thank you everybody, actually i should said it before, i'm trying to change the color of a table, that's why i don't want to sit on it to change it. *Estelle Pienaar just a little bit, i'm not really good at scripting but i can follow almost all the instructions from avsitter, but thanks for your help, i'll give it a look and hope can understand it. *Fenix Eldritch ohh that sounds easy, i'll look how to try it and hope it works. *Qie Niangao sorry the confusion, forgot to say what kind of object i was wanting to improve with the script. Thanks again, for taking the time to read&answer, it seems i may do it better with your tips. 2 Link to comment Share on other sites More sharing options...
Estelle Pienaar Posted July 24, 2019 Share Posted July 24, 2019 On 7/19/2019 at 10:48 PM, YuukoC said: Thank you everybody, actually i should said it before, i'm trying to change the color of a table, that's why i don't want to sit on it to change it. Thanks again, for taking the time to read&answer, it seems i may do it better with your tips. if you have questions on your way or if you run into problems, don't hesitate to ask them here! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now