Difference between revisions of "LlGetOwner"
Gally Young (talk | contribs) m (fixe) |
Eren Padar (talk | contribs) |
||
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 10:47, 23 February 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: key llGetOwner( );117 | Function ID |
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();
Caveats
Examples
Deep Notes
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 }}