Table of Contents

Start Functions Events Constants Types Language Articles

Function: llSay

llSay(integer channel, string message)

Say a message on the given channel with a range of 20 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

Short examples

// Send the text "Hello, friends" on channel zero. It will appear
// in the chat window of any avatar within 20 metres.
llSay(0, "Hello, friends");
llSay(PUBLIC_CHANNEL, "Hello friends"); // Variant of the above

// Send the text "Error in the script!" to the script warning/error window
llSay(DEBUG_CHANNEL, "Error in the script!");

Complete examples

llSay-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 20 metres of this prim.
        llSay(-123456, "I was touched by " + llDetectedName(0));
    }
}

See also