LlRegionSayTo
Looking for the current API? Open the llRegionSayTo reference →
Wiki description
Caveats
- Text is spoken directly to the object or avatar within the same region as the script.
- Script in tasks other than
targetcan neither listen forIn this context, this means waiting to receive a message., nor receive these text messages, with an exception for attachments as described below. msgcan be a maximum of 1024 bytes. This can convey 1024 ASCII characters, or 256-512 multibyte UTF-8 characters such asá(2 bytes),ℋ(3 bytes) or🧡(4 bytes).- A prim cannot hear itself, to prevent problems with recursion. Use llMessageLinked instead for intra-prim messaging.
- Sending text on
DEBUG_CHANNELis not supported. - Text sent to an avatar's ID on channel zero will be sent to the receiver's viewer.
- Text sent to an avatar's ID on non-zero channels can be heardI.e., received by any attachment on the avatar.
- A quick series of messages sent by llRegionSayTo cannot be relied on to arrive at their destination in the same order as sent.
- There is a per-destination throttle of 200 messages sent over 10 seconds on channel zero. Thereafter, there is also a per-sending-object throttle of 100 messages on channel zero over 300 seconds (5 minutes). This throttle is relevant only after the first throttle is activated. Messages sent on channels other than zero do not trigger the throttle but, once it is triggered, the block applies to all channels. The block is region-wide and applies to all objects with the same owner. The block apparently lasts until the region is restarted.
Examples
default
{
touch_start(integer num_detected)
{
key id = llDetectedKey(0);
// send a message to the chat window of the avatar touching
llRegionSayTo(id, 0, "You touched this!");
// send a message to the attachments of the avatar touching
// example channel: -12345
llRegionSayTo(id, -12345, "Hello there attachments!");
}
}Notes
- If one object 'says' something to another object (e.g., a button that, when touched, turns on a lamp), consider using a very negative
channel, e.g.,
:
llRegionSayTo("55499a64-45c3-4b81-8880-8ffb5a7c251b", -5243212, "turn on");:Using negative channels for script communications remains a common practice because, prior to September 2016, the standard Second Life Viewer was unable to chat directly on those channels (/-xxxx message wouldn't chat
message on channel -xxxx). - Messages sent on channel zero via llRegionSayTo() are blocked after 200 messages on to the same destination in a 10 second period. After this throttle is activated, there is a further throttle, on objects belonging to the owner of the object that triggered the first throttle, of 100 messages per object over 5 minutes (see BUG-5457). The block is region-wide and applies to all objects belonging to the owner, so if a script triggers the throttle, all objects in the same region belonging to the same owner will also be blocked. Messages sent on channels other than zero do not trigger the throttles. The throttles apparently reset only when the region is restarted.
Therefore, llRegionSayTo() is unsuitable for (say) verbose script debugging, and even moderate use can break users' content completely unrelated to the script for an indeterminate (and potentially very long) period of time. Consider using llOwnerSay() for debugging instead or, if this is not appropriate, try
llRegionSayTo(avatar, non-zero-channel, message) and have an attachment relay the message using llOwnerSay().See also: functions
|-
||| style="width:9em;" |
See also: events
|-
||| style="width:9em;" |
See also: articles
History
Date of Release 26/04/2011
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SCR-66|'''llRegionSayTo'''() Fails to send messages to attachments on sitting avatars|type=bug|resolution=fixed}}Original shared helper source (conditional wiki logic is not evaluated)
<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{LSL Injection Test}}{{#if:
{{#vardefine:p_{{{1|none}}}_desc|{{#if:{{{pd|}}}|{{{pd|}}} }}{{#if:{{{group|1}}}|{{LSLGC|Group|group}}, }}{{LSLGC|Avatar|avatar}} or {{#if:{{{object|}}}|[[object]]|[[prim]]}} {{HoverLink|UUID|Universally Unique Identifier}} {{#if:{{{sim|}}}|that is in the same [[region]] {{#switch:{{{sim|}}}|*=|#default =  {{{sim|}}}}}
}}}}
{{#vardefine:p_{{{1|none}}}_hover|{{#if:{{{ph|}}}|{{{ph|}}} |{{#if:{{{pd|}}}|{{{pd|}}} }}}}{{#if:{{{group|1}}}|group, }}avatar or {{#if:{{{object|}}}|object|prim}} UUID {{#if:{{{sim|}}}|that is in the same region {{#switch:{{{sim|}}}|*=|#default =  {{{sim|}}}}}
}}}}
<includeonly>
{{#ifeq:{{#var:article-type}}|event||{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{LSLC|Avatar/As A Parameter}}
}}}}}}
</includeonly>
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|none}}}_desc}}
|-
|hover
|{{#var:p_{{{1|none}}}_hover}}
|}
</noinclude>Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.