Difference between revisions of "LlOwnerSay"

From Second Life Wiki
Jump to navigation Jump to search
(Noted that swirly particle effects appear for the owner only)
m
Line 35: Line 35:
     // single owner that the region still has a handle for
     // single owner that the region still has a handle for
     if (llKey2Name(owner))
     if (llKey2Name(owner))
    {
         llOwnerSay(inputString);
         llOwnerSay(inputString);
    }
     // group owned, must send the message publicly
     // group owned, must send the message publicly
     else if (llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0) == owner)
     else if (llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0) == owner)
         llWhisper(0, "/me : " + inputString);
    {
         llWhisper(PUBLIC_CHANNEL, "/me : " + inputString);
    }
     // single owner, not present, send them an IM
     // single owner, not present, send them an IM
     else
     else
    {
         llInstantMessage(owner, inputString);
         llInstantMessage(owner, inputString);
    }
}
}
</lsl>
</lsl>

Revision as of 00:21, 9 October 2013

Summary

Function: llOwnerSay( string msg );

Says msg to the owner only.

• string msg message to be transmitted

Caveats

  • If msg is longer than 1024 bytes, it will be truncated to 1024 bytes. This can convey 1024 ASCII characters, or less if non-ASCII are present.
  • 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 ("").
  • Produces swirly particle effects for the owner (who sees the message) but these effects do not appear to be visible to other avatars (who don't).
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 with uOwnerSayPlus

uOwnerSayPlus(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 );