function
Function syntax
key llGetOwnerKey(key id// UUID of the prim in the same region.
);- Returns
key- Energy
- 10
Returns the key (UUID) of the owner of the prim specified by id.
Returns a key that is the owner of prim id
key result = llGetOwnerKey(NULL_KEY);Caveats
Section titled “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
listenevents of nearby objects. SVC-5095 - Also returns id for avatars, use
llGetAgentSizeinstead to distinguish them from prims that do not exist. - Returns
NULL_KEYif the id passed in is not a valid key
Examples
Section titled “Examples”Example 1
10 collapsed lines
default{ state_entry() { // listen to anything talking on channel 1 llListen(1, "", NULL_KEY, ""); // Type "/1 " + message (such as "/1 poke") to chat 'message' on channel 1. }
listen(integer channel, string name, key id, string message) { key ownerOfThisObject = llGetOwner(); key ownerOfSpeaker = llGetOwnerKey(id);
// if whoever is talking is the owner of this object7 collapsed lines
// or if the owner of the object talking is the owner of this object if (ownerOfSpeaker == ownerOfThisObject) { llOwnerSay("'" + name + "' has the same owner as me ^_^"); } }}See also
Section titled “See also”Functions
Section titled “Functions”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.