Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
(Manual undo. If an object is deleted it isn't (by default) on the same region...it isn't on any region.)
Line 3: Line 3:
|func=llGetOwnerKey|sort=GetOwnerKey
|func=llGetOwnerKey|sort=GetOwnerKey
|return_type=key|p1_type=key|p1_name=id
|return_type=key|p1_type=key|p1_name=id
|func_footnote=If '''id''' is not in the same region (or if deleted) then '''id''' is returned.  
|func_footnote=If '''id''' is not in the same region then '''id''' is returned.  
|func_desc
|func_desc
|return_text=that is the owner of object '''id'''
|return_text=that is the owner of object '''id'''

Revision as of 14:27, 3 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

If id is not in the same region then id is returned.

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 );