llGetOwner

From Second Life Wiki
Revision as of 10:50, 23 February 2008 by Eren Padar (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Summary

Function: key llGetOwner( );

Returns a key that is the owner of the script

IMPORTANT NOTE: If an object is transferred to a new owner and the script not reset, llGetOwner() will continue to return the value of the PREVIOUS owner rather than the new one (this has been reported as a bug in the JIRA system). This can be overcome by resetting the script, but this requires either a manual reset (which is cumbersome) or using an llResetScript() function upon rezzing. Since it is inefficient and in many cases undesirable to reset a script every time an item is rezzed, the following simple one-line workaround is preferrable:

changed(integer change){if (change & CHANGED_OWNER){llResetScript();

Examples

Deep Notes

Search JIRA for related Issues

Signature

function key llGetOwner();

This event checks to see if the owner has changed and if such is the case, resets the script one time.


|spec |caveats |constants |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> |helpers |also_functions= |-style="vertical-align:top;" | style="color:gray;" |•  | llGetCreator | style="color:gray;" | | | |-style="vertical-align:top;" | style="color:gray;" |•  | llGetOwnerKey | style="color:gray;" | | | |-style="vertical-align:top;" | style="color:gray;" |•  | llDetectedOwner | style="color:gray;" | | | |also_tests |also_events |also_articles |notes |cat1=Owner |cat2=Object |cat3=Key |cat4 }}