I thought I understood the theory, show the 'Set Access' sub-menu to the owner-only and then, depending on their choice, allow or disallow access to the main-menu to other users. I have another script which contains this feature and I thought it would be easy enough to merge the two scripts together. It isn't. At least not for me, I'm tying my script into knots.
Can anyone please advise on the simplest method to implement this controlled access - or point me to a simpler example I could merge with my existing script?
Thnx!
CONTROLLER:
CODE
integer menu_handler;
integer menu_channel;
menu(key user,string title,list buttons)
{
menu_channel = (integer)(llFrand(99999.0) * -1);
menu_handler = llListen(menu_channel,"","","");
llDialog(user,title,buttons,menu_channel);
llSetTimerEvent(5.0);
}
default
{state_entry()
{ llSetTouchText("windows");
}
touch_start(integer t)
{
menu(llDetectedKey(0),"Set the opacity for your windows...", ["closed","mid","open"]);
}
timer()
{
llSetTimerEvent(0.0);
llListenRemove(menu_handler);
}
listen(integer channel,string name,key id,string message)
{
if(message == "closed")
{
llMessageLinked(LINK_ALL_OTHERS, 0, "closed", "");
}
else if(message == "mid")
{
llMessageLinked(LINK_ALL_OTHERS, 0, "mid", "");
}
else if(message == "open")
{
llMessageLinked(LINK_ALL_OTHERS, 0, "open", "");
}
}
}
WINDOW SCRIPT:
CODE
default
{
link_message(integer sender_num, integer num, string message, key id)
{
if ( message == "closed" )
{
llSetAlpha(1.0, ALL_SIDES);
}
else if ( message == "mid" )
{
llSetAlpha(0.5, ALL_SIDES);
}
else if ( message == "open" )
{
llSetAlpha(0.0, ALL_SIDES);
}
}
}
wner
;
I'll reinstall the current release client and check again...