Difference between revisions of "LlGetOwner"

From Second Life Wiki
Jump to navigation Jump to search
(removed incorrect information)
Line 7: Line 7:
|return_text=that is the current owner of the script
|return_text=that is the current owner of the script


NOTE: Because LsL does not reset a script when it is transferred to a new owner, a script can retain old owner identity and even act upon the old owner unless the script is reset. While this appears up front to be a problem with llGetOwner(), this is not the case. The script must be reset upon owner change, which is most easily accomplished using the CHANGE event, as demonstrated below. Without such a reset event, significant problems can be experienced especially in the use of animations and other functions which act upon the owner of the device.
|spec
|spec
|caveats
|caveats

Revision as of 23:07, 23 February 2008

Summary

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

Returns a key that is the current owner of the script

NOTE: Because LsL does not reset a script when it is transferred to a new owner, a script can retain old owner identity and even act upon the old owner unless the script is reset. While this appears up front to be a problem with llGetOwner(), this is not the case. The script must be reset upon owner change, which is most easily accomplished using the CHANGE event, as demonstrated below. Without such a reset event, significant problems can be experienced especially in the use of animations and other functions which act upon the owner of the device.

Examples

<lsl>default {

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

Deep Notes

Signature

function key llGetOwner();

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