Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is object deeded to a group?

Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
03-29-2008 09:32
Hopefully just a quick question... I want an object to know if it is deeded to a group or not.

Note: this is not the same as getting llDetectedOwner() to return a NULL_KEY because I want the object the script is in to know if it is deeded itself.

Note 2: I don't care what the group is, just whether deeded or not.

I've been trying combinations of llGetOwner (which changes to the groups key if deeded?) but no luck..

Anyone know how to do this?
Weedy Herbst
Too many parameters
Join date: 5 Aug 2004
Posts: 2,255
03-29-2008 09:58
From: Ee Maculate
Hopefully just a quick question... I want an object to know if it is deeded to a group or not.

Note: this is not the same as getting llDetectedOwner() to return a NULL_KEY because I want the object the script is in to know if it is deeded itself.

Note 2: I don't care what the group is, just whether deeded or not.

I've been trying combinations of llGetOwner (which changes to the groups key if deeded?) but no luck..

Anyone know how to do this?


Here is a little utility I use to give me the status of an object and how it relates to the group and land. Cut/paste the parts which might apply to your situation.

deed()
{
key id = llGetOwner();
key objectOwner = llGetOwnerKey(llGetOwner());
string objectName = (string)llGetObjectDetails(llGetKey(), [OBJECT_NAME]);
key objectGroup = (string)llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
key landOwner = (llGetLandOwnerAt(llGetPos()));
string landName = (string)(llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME]));
key landGroup = (string)(llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_GROUP]));
{
if (objectOwner != landOwner)
{
llSay(0, "NOTE : The object owner does and land owner do not match.";);
}
else
{
llSay(0, "PASSED : The object and land owner match.";);
}
if (objectGroup != landGroup)
if (objectOwner != landOwner)
{
llSay(0, "NOTE : The object and land groups do not match.";);
}
else
{
llSay(0, "PASSED : The object and land group match.";);
}
if (llSameGroup(id))
{
llSay(0, "PASSED : The object and avatar's group match.";);
}
else
{
llSay(0, "NOTE : The object and avatar's group do not match.";);
}
return;
}
}
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
03-29-2008 10:02
Weedy, you're a star!

Thanks :)