llGetOwner

From Second Life Wiki
Revision as of 05:28, 24 February 2008 by Strife Onizuka (talk | contribs)
Jump to navigation Jump to search

Summary

Function: key llGetOwner( );

Returns a key that is the current owner of the script.

Caveats

  • When the owner of an object changes, code that depends on this function's return value will not automatically update for the new owner or be automatically re-evaluated.
    • This requires the reregistration of listens and requesting of permissions from the new owner as needed.
    • Detection of owner change can be achieved with the changed event in conjunction with the CHANGED_OWNER flag (see the first example) or by storing the old value and periodically (on_rez) checking if it has changed. Both techniques are valid though the latter will not detect the sale of the object if it is sold as original in world and not picked up.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   state_entry()
   {
       llInstantMessage(llGetOwner(), "Only you can hear me. Isn't that eerie.");
   }
   changed(integer change)
   {
       if (change & CHANGED_OWNER)
           llResetScript();
   }
}</lsl>

See Also

Functions

•  llGetCreator
•  llGetOwnerKey
•  llDetectedOwner

Deep Notes

Search JIRA for related Issues

Signature

function key llGetOwner();