Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 10: Line 10:
* 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.
** Owner information becomes unavailable ''immediately'' on derez or detach. For example, if an object chats at derez or detach time, '''id''' can be returned even inside [[listen]] events of nearby objects. <sup>{{Jira|SVC-5095}}</sup>
** Owner information becomes unavailable ''immediately'' on derez or detach. For example, if an object chats at derez or detach time, '''id''' can be returned even inside [[listen]] events of nearby objects. <sup>{{Jira|SVC-5095}}</sup>
* llGetOwnerKey('''id''') always returns '''id''' for avatars. Consider using [[llGetAgentSize]] for avatar tests.
* Also returns '''id''' for avatars. Consider using [[llGetAgentSize]] for avatar tests to distinguish them from objects that do not exist.
|constants
|constants
|examples=<lsl>key owner;
|examples=<lsl>key owner;

Revision as of 23:15, 28 September 2010

Summary

Function: key llGetOwnerKey( key id );

Returns a key that is the owner of prim 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.
    • Owner information becomes unavailable immediately on derez or detach. For example, if an object chats at derez or detach time, id can be returned even inside listen events of nearby objects. SVC-5095
  • Also returns id for avatars. Consider using llGetAgentSize for avatar tests to distinguish them from objects that do not exist.
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>

See Also

Functions

•  llKey2Name
•  llRequestAgentData
•  llGetObjectDetails
•  llGetOwner

Deep Notes

Search JIRA for related Issues

Signature

function key llGetOwnerKey( key id );