Suki Hirano Posted April 21, 2013 Share Posted April 21, 2013 Does anyone know what's the function that sets a touch menu so that only the owner of the attachment will activate it? A very helpful person helped me write this basic script that hides/shows certain prims of a worn attachment through a menu (for example, "hide base", "hide tubes", "show all", etc), but currently when I wear the attachment anyone can just click on my attachment then activate the menu, and hide/show my attachment parts.Here is the format of her script:touch_start(integer total_number) { ToucherID = llDetectedKey(0); listen_id = llListen( channel_dialog, "", ToucherID, ""); llDialog(ToucherID, msg, choices, channel_dialog); llSetTimerEvent(responsetime); } listen(integer channel, string name, key id, string choice) { llSetTimerEvent(0.0); if (choice == "Done") { llListenRemove(listen_id); return; } else if (choice == "hide all") { llSetLinkAlpha( LINK_SET, 0.0, ALL_SIDES ); batshow = FALSE; tubeshow = FALSE; } else if (choice == "show all") { llSetLinkAlpha( LINK_SET, 1.0, ALL_SIDES ); batshow = TRUE; tubeshow = TRUE; ... ... Link to comment Share on other sites More sharing options...
Jack Jaehun Posted April 21, 2013 Share Posted April 21, 2013 place in touch_start: see: http://lslwiki.net/lslwiki/wakka.php?wakka=llDetectedKey if (llDetectedKey(0) == llGetOwner()) { } Link to comment Share on other sites More sharing options...
Dora Gustafson Posted April 21, 2013 Share Posted April 21, 2013 Or: touch_start(integer total_number) { if ( llDetectedKey(0) == llGetOwner()) { listen_id = llListen( channel_dialog, "", llGetOwner(), ""); llDialog( llGetOwner(), msg, choices, channel_dialog); llSetTimerEvent(responsetime); } } Link to comment Share on other sites More sharing options...
Suki Hirano Posted April 21, 2013 Author Share Posted April 21, 2013 Thank you both. Simple and works perfectly. On a related note, is there an article in the wiki about access list? For example, prevent anyone except [john smith, jane doe, bob joe] from accessing the menu? Link to comment Share on other sites More sharing options...
LepreKhaun Posted April 22, 2013 Share Posted April 22, 2013 Suki Hirano wrote:Thank you both. Simple and works perfectly. On a related note, is there an article in the wiki about access list? For example, prevent anyone except [john smith, jane doe, bob joe] from accessing the menu? http://wiki.secondlife.com/wiki/LlKey2Name shows how you would obtain the name of the detected key. Than it's simply a matter of comparison with your black list. If your black list gets too long though, you may find it easier to maintain a white list of allowed agent names. Link to comment Share on other sites More sharing options...
Suki Hirano Posted April 22, 2013 Author Share Posted April 22, 2013 Well the blacklist is everyone except those 3 people in SL. Basically I'm building one of those things where if someone clicks an emote through a menu it'll say something in local chat like "Jane Doe poked you on the tail!". But only a few people are allowed to touch the attachment. Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 22, 2013 Share Posted April 22, 2013 Suki Hirano wrote: Well the blacklist is everyone except those 3 people in SL. Basically I'm building one of those things where if someone clicks an emote through a menu it'll say something in local chat like "Jane Doe poked you on the tail!". But only a few people are allowed to touch the attachment. So, as Leprekhan says, create a whitelist instead. 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