A B C D E F G I J K L M N O R S T U V W

Chat functions allow objects and agents to communicate with each other and among themselves.

Chat in Second Life uses channels. Channel 0 is the public chat channel all users see as chat text. There is no way for users to listen to any channel other than channel 0 directly, though users can send messages on other channels using llDialog or by specifiying a channel in the chat text-entry field itself.

Users can send messages to other channels by typing “/num message”, where “num” is the number of the channel and “message” is the desired chat text. So, “/10 Hello, script!” will say “Hello, script!” on channel 10. Additionally, “//message” can be used to send “message” to the last-used chat channel.

Channels are stored as signed integers, so the possible chat channels range from -2147483648 to 2147483647. Scripts can both listen and talk on all channels, whilst users listen on channel 0 only and are unable to send messages on negative channels.

A script can only have up to 64 listens open at a time (if it goes over its limit, it crashes with a “Too Many Listens” run-time error). The functions listed at the bottom help manage situations where this error may occur.

If the string passed to the chat function is greater then 1023 bytes long, it is truncated (chopped off) at its 1023th byte.

Prims that output chat never receive their own output back in listen events. This applies to all scripts in that primitive, not just the one that called the chat function. This is a good thing–trust us. To communicate between scripts in the same primitive, use llMessageLinked. Prims in the same link-set can use chat to communicate with one another, but this practice is discouraged (the use of llMessageLinked is recommended instead).

Chat can be heard within a sphere centered on the sender:

Function Radius
llWhisper 10m
llSay 20m
llShout 100m
llRegionSay Entire Region

Other Chat Functions

  • llDialog
  • llListen
  • llListenControl
  • llListenRemove
  • llOwnerSay

Q: Is there a way to specify an arbitrary chat radius? What if I want to chat in a bigger range than 20m, but less than 100? Better yet, is there a way to limit or extend chat to cover a given parcel of land?

A: Unfortunately, no. You could do something with attachments and llOwnerSay, but there’s no way to do it by default.
You could always use a sensor and llInstantMessage the detected users in a for() loop. -JacobxGoff