I have 2 objects - one of them generates a channel using: MyChannel = 0x80000000 | (integer)("0x"+(string)llGetOwner); let's call that object "the key" and the second object, "the listener" generates the channel with: MyChannel = 0x80000000 | (integer)("0x"+(string)llGetObjectDesc); where llGetObjectDesc contains the UUID of the person holding "the key". 2 people. 1 of them holds the key, the other the listener For example: I, Morri(c043ccc0-8416-417d-aa69-0155d67ff857), have "the key", and it generates the channel using my own UUID. Second person, has "the listener" and it generates the channel using MY UUID, which is in the object's description. In result, we both are using the same channel and can communicate between these two objects. The issue: The problem I have with that is if there was 1 person holding the key, and 5 people had the listener object and all of them had the same UUID of the person holding the key in their object description = the key commands would affect all 5 listeners at the same time. How do I link 1 key to only 1 listener? Code: The lintener: integer MyChannel;
key MyOwner;
default
{
state_entry()
{
MyOwner = llList2String(llGetLinkPrimitiveParams(4, [ PRIM_DESC ]), 0);
MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner);
llListen (MyChannel,"","","");
}
listen(integer channel, string name, key id, string msg)
{
if(msg == "show") {
llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);
}
}
} The key: integer MyChannel;
key MyOwner;
integer gListener;
default
{
state_entry()
{
MyOwner = llGetOwner();
MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner);
}
changed(integer change)
{
if (change & CHANGED_OWNER){
llResetScript();
}
}
touch_start(integer total_number)
{
llListenRemove(gListener);
key user = llGetOwner();
gListener = llListen(-99, "", user, "");
llDialog(user, "\nWhat do you want to do?", ["Show", "Hide"] , -99);
llSetTimerEvent(60.0);
}
listen(integer chan, string name, key id, string msg)
{
if(llToLower(msg) == "hide")
{
llSay(MyChannel, "hide");
}
else if(llToLower(msg) == "show")
{
llSay(MyChannel, "show");
}
llSetTimerEvent(0.1);
}
timer()
{
llListenRemove(gListener);
llSetTimerEvent(0.0);
}
}