Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
m (Add llGetOwner as See Also Function)
m
Line 33: Line 33:
|also_functions={{LSL DefineRow||[[llKey2Name]]|}}
|also_functions={{LSL DefineRow||[[llKey2Name]]|}}
{{LSL DefineRow||[[llRequestAgentData]]|}}
{{LSL DefineRow||[[llRequestAgentData]]|}}
{{LSL DefineRow||[[llGetObjectDetails]]|}}
{{LSL DefineRow||[[llGetOwner]]|}}
{{LSL DefineRow||[[llGetOwner]]|}}
|also_tests
|also_tests

Revision as of 06:36, 4 April 2009

Summary

Function: key llGetOwnerKey( key id );
0.0 Forced Delay
10.0 Energy

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

<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

Signature

function key llGetOwnerKey( key id );