This is an old revision of the document!
Function: llShout
llShout(integer channel, string message)
Shout a message on the given channel with a range of 100 metres.
Parameters
channel
Determines the channel that message will be sent on.
Channel can be any integer, positive or negative.
Channel 0 is open chat (also known as PUBLIC CHANNEL).
Channel DEBUG_CHANNEL will send the message to the Script Warning/Error window.
message
Contains the text to be said.
Notes
Text said via llShout can be heard up to 100 metres away from the prim the script is in.
Messages sent on channel 0 or on
DEBUG_CHANNEL, are throttled to a rate of about 200 every 10 seconds, per region, per owner/user.
message can be a maximum of 1024 bytes when translated to
UTF-8. The allowed number of characters can vary depending on what characters the message contains. For example, it allows:
up to 1024 UTF-8 characters in the ASCII range such as A or %,
up to 512 two-byte UTF-8 characters such as И or £,
up to 341 three-byte UTF-8 characters such as ツ or €,
etc. or a mixture of them.
Negative channels are typically used for inter-object communication.
A script cannot hear anything said by any script within the same prim. This avoids recursion problems. It can hear text sent from a script in another prim within the same object. Since the linkage limit is 54m, it's presumed that it will be within range.
Short examples
// Send the text "Hello, friends" on channel zero. It will appear
// in the chat window of any avatar within 100 metres.
llShout(0, "Hello, friends");
llShout(PUBLIC_CHANNEL, "Hello friends"); // Variant of the above
// Send the text "Error in the script!" to the script warning/error window
llShout(DEBUG_CHANNEL, "Error in the script!");
Complete examples
- llShout-example.lsl
default
{
touch_start(integer count)
{
// Send a message on a specific negative channel
// The message will only be received by scripted prims that are listening on that channel
// and are within 100 metres of this prim.
llShout(-123456, "I was touched by " + llDetectedName(0));
}
}
See also
llSay for a 20 metres range version.
-
-
lRegionSay to say something in a certain channel to every avatar/prim in the region (but channel 0 is disallowed).
llRegionSayTo to say something to a specific avatar or prim in the region.
llInstantMessage to send an instant message to the specified avatar (can be across regions).
llListen to listen to what avatars or scripts say in a certain channel, and the accompanying
listen event.