Difference between revisions of "LlGetOwner"

From Second Life Wiki
Jump to navigation Jump to search
m (fixe)
Line 6: Line 6:
|func_desc
|func_desc
|return_text=that is the owner of the script
|return_text=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();}}
This event checks to see if the owner has changed and if such is the case, resets the script one time.
|spec
|spec
|caveats
|caveats

Revision as of 09:47, 23 February 2008

Summary

Function: key llGetOwner( );
0.0 Forced Delay
10.0 Energy

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

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

}</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 }}