Hey guys! Sorry about my English, it's not my first language.
But I'm learning with script. I want make sure it's only private clickable for only two user, for example, Jane and John only clickable and everyone can't click.
Please tell me how make it private clickable for two users only.
list buttons = ["Kisses", "Hugs", "Snuggles"];
string dialogInfo = "\nPlease make a choice.";
key ToucherID;
integer dialogChannel;
integer listenHandle;
default
{
state_entry()
{
dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
}
touch_start(integer num_detected)
{
ToucherID = llDetectedKey(0);
llListenRemove(listenHandle);
listenHandle = llListen(dialogChannel, "", ToucherID, "");
llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
}
listen(integer channel, string name, key id, string message)
{
if (message == "Kisses")
{
llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
llSay(0, "John kissed Jane!");
}
llListenRemove(listenHandle);
if (message == "Hugs")
{
// process Red here
llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
llSay(0,"John hugged Jane!");
}
else if (message == "Snuggles")
{
// process Green here
llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
llSay(0,"John snuggled Jane!");
}
}
}