Jump to content

Need some help with touch script


Taaruf
 Share

You are about to reply to a thread that has been inactive for 3917 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Thats the reason why im gonna stick with the old script, it was easier edit the messages, it showed more clear which line was from which category.

The only thing i wanted on that one was the name of the object to disappear in chat once the message came up.

Guess thats impossible since we r on page 3 and still not solved =D

Link to comment
Share on other sites


Taaruf wrote:

Thats the reason why im gonna stick with the old script, it was easier edit the messages, it showed more clear which line was from which category.

Stick with it if you want but that isn't what you asked for when you first came in, and it only had 2 buttons to react to. Of course that was easy to figure out. The last time I was near a group of furries, they were all wildly clicking on each other's tails - something that will cause problems with your script as it is. It is still easy for it to be laggy, make errors, and contribute to your being asked to leave (or ejected) from a lot of sims.


Taaruf wrote:

The only thing i wanted on that one was the name of the object to disappear in chat once the message came up.

Originally that's all you asked for. Then you came back wanting to know how to add more options and reactions, some of them that include changing its name still again. All of these things, asked separately, makes the logic for the script change, and can easily mean an entire re-write, not just a simple edit. Wait until you try to have a few more than 3 buttons and see how mangled the dialog is when it is clicked. There is a good reason you were told to try to understand what it was doing and why. I would have even made changes to the one I wrote to make it a little more readable and able to add some more options, but you would still need to try to understand it a little more yourself. This part of the forum isn't for writing and giving away free (or commercial) scripts - its for helping people write their own. No one had to offer the scripts they did; it was done out of kindness.


Taaruf wrote:

Guess thats impossible since we r on page 3 and still not solved =D

I'm sure at least 2 of them did exactly what you originally asked for; Rolig wasn't able to test hers inworld before offering it to you, but I'm pretty sure Leprekhan's does exactly that. I tested mine inworld and it worked fine. I would still see it this morning and easily see how to improve it for readability and editability, but why? You would need to try to understand it yourself or someone else helping will be a never-ending job.

Link to comment
Share on other sites

OK, I see what you really need, a way to customize the possible responses on the fly. So, let's get away from llDialog completely because that will just get harder to customize with more responses as you think of them. Besides, you might have a *really* good response come to mind at the spur of the moment and not be able to use it right then.

 

Here's what I'd suggest, Just chat to your script on channel /5 exactly what you want it to say. If you do it that way, you'll never have to modify your script again. :matte-motes-sunglasses-3:

integer listen_handle;default{    attach (key id)    {        if (id) llSetObjectName("");  // This makes the object's name go away    }    touch_start(integer total_number)    {        string name = llKey2Name(llDetectedKey(0));        // This tells just you who touched and reminds you how to respond        llOwnerSay(llGetSubString(name,0,llSubStringIndex(name," ")) + "just touched your tail! Tell me what to say on channel /5");        listen_handle = llListen (5, "", llGetOwner(), "");  // this opens a listen handle on channel /5    }        listen(integer channel, string name, key id, string message){        llListenRemove(listen_handle); // stop listening        llSay (0, "/me " + message);  // Says exactly what you chatted on channel /5!    }}

 

Link to comment
Share on other sites


Erik Verity wrote:

... 
The last time I was near a group of furries, they were all wildly clicking on each other's tails - something that will cause problems with your script as it is. ...


 

Actually, his would fare better than yours under those circumstances. You failed to close the listen handle before opening.

Link to comment
Share on other sites

There is never a listen handle left open before opening another in the script I published. All listen handles are closed when responded to, or after a the timer runs out. There is no exception to this in that script.

if(time) enforces it - the time variable has its exclusive relationship with the timer on purpose - a float with no math ever being done with its value to allow imprecision.. If someone does not respond to a dialog or clicks ignore, the next user still has to wait on the timer to close the listener. I also still see closing a listener immediately before opening one in the touch as allowing them the object to be broken when it is in use unless other steps are taken to prevent it.

Link to comment
Share on other sites

Thanks for all the help, it works great now!

Somtimes i meet people that starts griefing, click spam etc, filling up the chat. Giving me the blame :]

So i was just curious if its possible to add somthing to the script that could perhaps ban people of my choice from being able to click?, some kind of allow list.

I dont mean that i need to allow people to click, just baning the ones i dont want to be able to click :]

 

Is that possible?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3917 days.

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
 Share

×
×
  • Create New...