Says the string msg on channel number channel that can be heard anywhere in the region by a script listening on channel.

Syntax

void llRegionSay( integer channel, string msg );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

integer channel
output chat channel, any integer value except zero[1]
string msg
message to be transmitted

Regardless of where the prim is, the message will not travel over region borders.

Constants

Channel ConstantDescription
DEBUG_CHANNEL0x7FFFFFFFChat channel reserved for script debugging and error messages, broadcasts to all nearby users.

Caveats

Examples

default
{
    state_entry()
    {
        llRegionSay(25,"This is an incredibly useless program." );
    }
}

To avoid making your object spam its neighborhood, use llOwnerSay or llInstantMessage.

Notes

If one object 'says' something to another object (e.g., a button that, when touched, turns on a lamp), consider a very negative channel, e.g.,

    llRegionSay(-5243212,"turn on");

Using negative channels for script communications remains a common practice because, prior to September 2016, the standard SL client was unable to chat on negative channels. The only way to do so prior to llTextBox was to use llDialog which was limited to 24 bytes. However, since 2016, viewers have been able to chat on negative channels, with messages capped to 254 bytes.

If DEBUG_CHANNEL is used as channel, the script will say msg to the Script Warning/Error window.

If you wish two objects owned by the same person to communicate within a SIM, one idea is to make both scripts compute the channel based on the owner UUID. e.g. :-

    gChannel = 0x80000000 | (integer) ( "0x" + (string) llGetOwner() );

See also

Events

Functions

Deep notes

History