Difference between revisions of "LlOwnerSay"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 12: Line 12:
* Some viewers do not display llOwnerSay text when {{LSLP|msg}} is empty ({{String}}).
* Some viewers do not display llOwnerSay text when {{LSLP|msg}} is empty ({{String}}).
|constants
|constants
|examples=<lsl>default
|examples=
<lsl>
default
{
{
     touch_start(integer total_number)
     touch_start(integer num_detected)
     {
     {
         llOwnerSay("Ouch!" );
         llOwnerSay("Ouch!");
     }
     }
}</lsl>
}
</lsl>
|helpers=
|helpers=
<lsl> //-- llOwnerSay extension for preventing silent failures
<lsl>
//-- paste this code at the top of the script and replace
// llOwnerSay extension for preventing silent failures
//--  any calls to llOwnerSay below it with uOwnerSayPlus
// paste this code at the top of the script and replace
uOwnerSayPlus( string vStrMsg ){
// any calls to llOwnerSay below it with uOwnerSayPlus
key owner = llGetOwner();
 
if (llKey2Name( owner )){
owner_say(string inputString)
llOwnerSay( vStrMsg ); //-- single owner that the region still has a handle for
{
}else if (llList2Key( llGetObjectDetails( llGetKey(), [OBJECT_GROUP] ), 0 ) == owner){
    key owner = llGetOwner();
llWhisper( 0, "/me : " +vStrMsg ); //-- group owned, must send the message publicly
 
}else{
    // single owner that the region still has a handle for
llInstantMessage( owner, vStrMsg ); //-- single owner, not present, send them an IM
    if (llKey2Name(owner))
}
        llOwnerSay(inputString);
}</lsl>
    // group owned, must send the message publicly
    else if (llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0) == owner)
        llWhisper(PUBLIC_CHANNEL, "/me : " + inputString);
    // single owner, not present, send them an IM
    else
        llInstantMessage(owner, inputString);
}
</lsl>
|also_functions=
|also_functions=
{{LSL DefineRow||[[llRegionSay]]|Sends chat region wide}}
{{LSL DefineRow||[[llRegionSay]]|Sends chat region wide}}

Revision as of 09:37, 24 September 2012

Summary

Function: llOwnerSay( string msg );

Says msg to the owner only.

• string msg message to be transmitted

Caveats

  • If msg is longer than 1023 bytes, it will be truncated to 1023 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 a group.
  • Some viewers do not display llOwnerSay text when msg is empty ("").
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> default {

   touch_start(integer num_detected)
   {
       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

owner_say(string inputString) {

   key owner = llGetOwner();
   // single owner that the region still has a handle for
   if (llKey2Name(owner))
       llOwnerSay(inputString);
   // group owned, must send the message publicly
   else if (llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0) == owner)
       llWhisper(PUBLIC_CHANNEL, "/me : " + inputString);
   // single owner, not present, send them an IM
   else
       llInstantMessage(owner, inputString);

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