Jump to content

Allow other people to use the menu for an attachment


CadenzaInVivace
 Share

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

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

Recommended Posts

Hello, I have an attachment that gives a menu when I click on it. Right now I can set it so that other people can click my item and get the menu, and play around with my attachment with the following:

 

 touch_start(integer total_number) 
  {
     ToucherID = llDetectedKey(0);
    string name = llKey2Name(ToucherID);
    if (name == "ABC Resident" || name == "DEF Resident" || name == "Myself Resident") {
        listen_id = llListen( channel_dialog, "", ToucherID, "");
        pageNum = 1;
        giveDialog(ToucherID, pageNum);
        llSetTimerEvent(Timeout);
    }
  }

listen(integer channel, string name, key id, string choice)
   {
   llSetTimerEvent(0.0);

     if (choice == "choice1")
    { //do stuff
...
...

 

That works. However if we are both wearing the same attachment, and one of us clicks either one's attachment, BOTH attachments will get affected by the changes made through the menu (like hide/show, retexture, etc). How do I make it so that both (or more) people can USE the menu, but the changes made through that menu will only affect that person's attachment?

 

Thanks.

Link to comment
Share on other sites

That's only natural when both attachments use the same communication channel
In this case the value of 'channel_dialog' are probably the same in both attachments

One common and easy way to overcome the problem is to assign a big negative random number to the communication channel
Another way is to use a part of the owners UUID as base for the number

You should be able to to find examples in the wiki library and in many other places

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3688 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...