Difference between revisions of "LlGetOwnerKey"

From Second Life Wiki
Jump to navigation Jump to search
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples
|examples=
<pre>
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 ^_^");
        }
    }
}</pre>
|helpers
|helpers
|also_functions
|also_functions

Revision as of 03:34, 11 March 2007

Summary

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

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

Deep Notes

Search JIRA for related Issues

Signature

function key llGetOwnerKey( key id );