Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
(Clarified actual behavior when llGetOwnerKey queries a uuid that is not found in the region)
Line 7: Line 7:
|return_text=that is the owner of object '''id'''
|return_text=that is the owner of object '''id'''
|spec
|spec
|caveats
|caveats=
* Returns '''id''' if '''id''' is not found in the region or is not an object.
* Returns '''id''' if '''id''' is not found in the region or is not an object.
* '''id''' can be any prim in the object.
* '''id''' can be any prim in the object.

Revision as of 13:39, 16 September 2010

Summary

Function: key llGetOwnerKey( key id );

Returns a key that is the owner of object id

• key id group, avatar or prim UUID that is in the same region

Caveats

  • Returns id if id is not found in the region or is not an object.
  • id can be any prim in the object.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>key owner;

default {

   state_entry()
   {
       owner = llGetOwner();
       llListen(1, "", "", "");
   }
   on_rez(integer a)
   {
       owner = llGetOwner();
   }
   listen(integer chan, string name, key id, string msg)
   {
       if(llGetOwnerKey(id) == owner)
       {//Only triggers if what spoke is the owner or if they share the same owner
           llOwnerSay(name + " has the same owner as me ^_^");
       }
   }
}</lsl>

Notes

When used on an avatars key, the key of that avatar is returned again. So avatars are owned by themself.

See Also

Functions

•  llKey2Name
•  llRequestAgentData
•  llGetObjectDetails
•  llGetOwner

Deep Notes

Search JIRA for related Issues

Signature

function key llGetOwnerKey( key id );