Jump to content

LlGetOwnerKey

From OSgrid Wiki
Revision as of 22:55, 31 December 2017 by Osgridadmin (talk | contribs) (Created page with "==Function: key llGetOwnerKey( key id );== Returns a key that is the owner of object id <br> • key id <br> <br> If id is not in the same sim then id is returned. <br> '...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function: key llGetOwnerKey( key id );

Returns a key that is the owner of object id
• key id

If id is not in the same sim then id is returned.
Examples

<source lang="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 ^_^");
       }
   }

} </source>


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