and don't understand the problem I have. When I run the script below, I get perm that says I do have permission to attach. See code below
If this doesn't work, How can I get another avatar to be able to attach an object without having to have them save them to their inventory first? Is there an easier way?
help and thanks!
Drue...
integer DEBUG = TRUE; // debug
string strName;
default {
touch_start(integer num_detected)
{
strName = llKey2Name(llGetKey()) ;
if (DEBUG == TRUE) llSay(0, "got to touch_start"
; llRequestPermissions(llDetectedKey(0), PERMISSION_ATTACH);
}
run_time_permissions(integer perm)
{
if (DEBUG == TRUE) llSay(0, "got to run_time permissions"
; if (DEBUG == TRUE) llSay(0, "permissions granted was: " + (string)perm);
if (perm & PERMISSION_ATTACH)
{
// gets to here - so permissions are granted? right?
if (DEBUG == TRUE) llSay(0, "Permission to attach is present"
; llAttachToAvatar(ATTACH_LHAND);
}
}
attach(key attached)
{
//Doesn't reach here
if (DEBUG == TRUE) llSay(0, "attach event reached"
; if(attached != NULL_KEY) // object has been attached
{
llShout(nAttachedChannel, "Wooden Stick Attached"
;}
else
{
llShout(nDetachedChannel, "Wooden Stick Unattached"
;}
}
}