Difference between revisions of "LlOwnerSay"

From Second Life Wiki
Jump to navigation Jump to search
m
m (-footnote +caveats +helpers)
Line 2: Line 2:
|func_id=292|func_sleep=0.0|func_energy=10.0
|func_id=292|func_sleep=0.0|func_energy=10.0
|func=llOwnerSay|p1_type=string|p1_name=msg
|func=llOwnerSay|p1_type=string|p1_name=msg
|func_footnote=Owner must be in the same [[region]], although messages will continue to come through for approximately 45 seconds after leaving the region.
|func_desc=Says '''msg''' to the owner only.
|func_desc=Says '''msg''' to the owner only.
|return_text
|return_text
|spec
|spec
|caveats=
|caveats=
*Truncates '''msg''' to 1024 bytes if '''msg''' is more than 1024 bytes long.
* If '''msg''' is longer than 1024 bytes, it will be truncated to 1024 bytes.
*Silently fails when the object to which the script is attached is deeded to group.
* Silently fails ~45 seconds after the owner leaves the region the object is in.
* Silently fails when the object to which the script is attached is deeded to group.
|constants
|constants
|examples=<lsl>default
|examples=<lsl>default
Line 17: Line 17:
     }
     }
}</lsl>
}</lsl>
|helpers
|helpers=
<lsl> //-- llOwnerSay extension for preventing silent failures
//-- paste this code at the top of the script and replace
//--  any calls to llOwnerSay below it with uOwnerSayPlus
uOwnerSayPlus( string vStrMsg ){
if (llKey2Name( llGetOwner() )){
llOwnerSay( vStrMsg ); //-- single owner that the region still has a handle for
}else if (llList2Key( llGetObjectDetails( llGetKey(), [OBJECT_GROUP] ), 0 ) == llGetOwner()){
llWhisper( 0, "/me : " +vStrMsg ); //-- group owned, must send the message publicly
}else{
llInstantMessage( llGetOwner(), vStrMsg ); //-- single owner, not present, send them an IM
}
}</lsl>
|also_functions=
|also_functions=
{{LSL DefineRow||[[llRegionSay]]|Sends chat region wide}}
{{LSL DefineRow||[[llRegionSay]]|Sends chat region wide}}

Revision as of 05:06, 3 April 2011

Summary

Function: llOwnerSay( string msg );

Says msg to the owner only.

• string msg

Caveats

  • If msg is longer than 1024 bytes, it will be truncated to 1024 bytes.
  • Silently fails ~45 seconds after the owner leaves the region the object is in.
  • Silently fails when the object to which the script is attached is deeded to group.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   touch_start(integer total_number)
   {
       llOwnerSay("Ouch!" );
   }
}</lsl>

Useful Snippets

<lsl> //-- llOwnerSay extension for preventing silent failures

//-- paste this code at the top of the script and replace
//--  any calls to llOwnerSay below it with uOwnerSayPlus

uOwnerSayPlus( string vStrMsg ){ if (llKey2Name( llGetOwner() )){ llOwnerSay( vStrMsg ); //-- single owner that the region still has a handle for }else if (llList2Key( llGetObjectDetails( llGetKey(), [OBJECT_GROUP] ), 0 ) == llGetOwner()){ llWhisper( 0, "/me : " +vStrMsg ); //-- group owned, must send the message publicly }else{ llInstantMessage( llGetOwner(), vStrMsg ); //-- single owner, not present, send them an IM } }</lsl>

See Also

Functions

•  llRegionSay Sends chat region wide
•  llWhisper Sends chat limited to 10 meters
•  llSay Sends chat limited to 20 meters
•  llShout Sends chat limited to 100 meters
•  llInstantMessage

Articles

•  Limits SL limits and constrictions

Deep Notes

Search JIRA for related Issues

Tests

• llOwnerSay Test

Signature

function void llOwnerSay( string msg );