Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
{{LSL_Function/prim|id|sim=*|}}{{LSL_Function
{{LSL_Function
|inject-2={{LSL_Function/prim|id|sim=*}}
|func_id=182|func_sleep=0.0|func_energy=10.0
|func_id=182|func_sleep=0.0|func_energy=10.0
|func=llGetOwnerKey|sort=GetOwnerKey
|func=llGetOwnerKey|sort=GetOwnerKey
Line 5: Line 6:
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=that is the owner of prim '''id'''
|return_text=that is the owner of prim {{LSLP|id}}
|spec
|spec
|caveats=
|caveats=
* Returns '''id''' if '''id''' is not found in the region or is not a prim.
* Returns {{LSLP|id}} if {{LSLP|id}} is not found in the region or is not a prim.
** Owner information becomes unavailable ''immediately'' on derez or detach. For example, if a prim 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 a prim chats at derez or detach time, {{LSLP|id}} can be returned even inside [[listen]] events of nearby objects. <sup>{{Jira|SVC-5095}}</sup>
* Also returns '''id''' for avatars, use [[llGetAgentSize]] instead to distinguish them from prims that do not exist.
* Also returns {{LSLP|id}} for avatars, use [[llGetAgentSize]] instead to distinguish them from prims that do not exist.
|constants
|constants
|examples=<lsl>key owner;
|examples=<lsl>key owner;

Revision as of 10:26, 13 June 2012

Summary

Function: key llGetOwnerKey( key id );

Returns a key that is the owner of prim id

• key id prim UUID that is in the same region

Caveats

  • Returns id if id is not found in the region or is not a prim.
    • Owner information becomes unavailable immediately on derez or detach. For example, if a prim chats at derez or detach time, id can be returned even inside listen events of nearby objects. SVC-5095
  • Also returns id for avatars, use llGetAgentSize instead to distinguish them from prims 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 );