Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detecting where a prim is attached

Cherry Hotaling
Registered User
Join date: 25 Feb 2007
Posts: 86
03-23-2008 12:32
Hello,

I was wondering how you would go about having a script Detect if it was attached to Left Hand or not. What would be required to do that?

Thanks

-Lady Cherry
Soen Eber
Registered User
Join date: 3 Aug 2006
Posts: 428
03-23-2008 13:23
http://wiki.secondlife.com/wiki/LlGetAttached

Example script from the page:
CODE

default
{
attach(key id)
{
if(id)//it's attached
{
if(llGetAttached() != ATTACH_LHAND)
{
llOwnerSay("Please attach me only to the left hand");
llRequestPermissions(id, PERMISSION_ATTACH);
}
}
}
run_time_permissions(integer a)
{
if(a & PERMISSION_ATTACH)
llDetachFromAvatar();
}
}
Cherry Hotaling
Registered User
Join date: 25 Feb 2007
Posts: 86
03-23-2008 15:34
ok great thank you very much.