Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
m (multi lang)
m (<lsl> example)
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples=
|examples=<lsl>key owner;
<pre>
key owner;


default
default
Line 31: Line 29:
         }
         }
     }
     }
}</pre>
}</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llKey2Name]]|}}
|also_functions={{LSL DefineRow||[[llKey2Name]]|}}

Revision as of 02:22, 14 January 2008

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>

See Also

Functions

•  llKey2Name
•  llRequestAgentData

Deep Notes

Signature

function key llGetOwnerKey( key id );