Difference between revisions of "Category:LSL Chat"

From Second Life Wiki
Jump to navigation Jump to search
(forgot to set the column titles, 255 limit was changed years ago.)
Line 3: Line 3:
Chat communication is as it sounds. It is text "said" so that anyone (or anything) listening within range can hear it. It can be two-way communication.
Chat communication is as it sounds. It is text "said" so that anyone (or anything) listening within range can hear it. It can be two-way communication.


Users can only see chat sent on the two public channels, 0 (PUBLIC_CHANNEL) and 2147483647 ([[DEBUG_CHANNEL]]); scripts on the other hand can [[listen]] to any chat on any channel. Agents can only directly chat on positive channels{{Footnote|This is likely just a limitation of the client and not an actual restriction; it should not be depended upon.}}, but scripts can chat and listen on any channel. The complete range of channels is -2147483648 to 2147483647.


In the client when you begin a chat message in the chat text-entry field as /1 , the 1 is the channel you are speaking on{{Footnote|This is a client feature and not part of the protocol, other clients may implement this differently or not at all.}}.


Only chat sent on channel 0 is openly visible to avatars in the area, but any script can listen to any chat on any channel. Agents can only chat on positive channels, but scripts can chat and listen on any channel between -2147483648 to 2147483647.
{{Tip|// (two forward-slashes) is shortcut for the last special channel you entered in chat.}}


When you begin a chat message in the chat text-entry field as /1 , the 1 is the channel you are speaking on.
Chat messages can be a maximum of 1023 bytes; they are truncated past that.
 
[Tip! // (two forward-slashes) is shortcut for the last special channel you entered in chat.]
 
Chat messages can be a maximum of 255 bytes; they are truncated past that.


A scripted prim cannot hear itself speak. Scripts listening in a linked prim, though, will hear the chat. Generally, though, communication between scripts in the same object is handled via [[llMessageLinked]].
A scripted prim cannot hear itself speak. Scripts listening in a linked prim, though, will hear the chat. Generally, though, communication between scripts in the same object is handled via [[llMessageLinked]].


To "hear" chat, a script has to specifically initiate up a "listen." A single script has a limit of 64 listens; beyond that it will emit a "Too Many Listens" squawk, and crash.
To "hear" chat, a script has to specifically initiate a "listen." A single script has a limit of 64 listens at any one time; beyond that it will emit a "Too Many Listens" squawk, and crash. The script can manage it's listens, creating, releasing and disabling them.  


The distance that chat can be heard depends on the type of chat used, and where the speaker is. The distance emits in a circle around the speaker, with varying radiuses:
{| {{Prettytable|style=float:left;margin-top:0;}}
 
{|{{Prettytable}}
|+
|+
|-{{Hl2}}
|-{{Hl2}}
!Substring
!Function
!Replaced with
!Distance
|-
|-
|| [[llWhisper]] || 10 metres
|| [[llWhisper]] || 10 metres
Line 33: Line 29:
|| [[llRegionSay]] || sim-wide
|| [[llRegionSay]] || sim-wide
|}
|}
The distance that chat can be heard depends on the type of chat used, and where the speaker is. The sphere in which the chat can be heard is centered on the position of speaker, be that an avatar or a prim.


The above parameters are fixed; there is no way to lengthen or shorten the distance or direct it in any special direction.
The above parameters are fixed; there is no way to lengthen or shorten the distance or direct it in any special direction.


llRegionSay is an exception; it is not centred on the speaker, but rather heard anywhere in the sim.
[[llRegionSay]] is an exception; as it can be heard anywhere in the sim but with the limitation that it cannot broadcast on {{LSL Const|PUBLIC_CHANNEL|integer|0}}.
 
<div style="clear:left;"></div>


=== User-created utility functions ===
=== User-created utility functions ===
Line 44: Line 41:
{{LSL DefineRow||[[mySayOwner]]|Cleaner chat messages on a user's screen (speaks to owner only)}}
{{LSL DefineRow||[[mySayOwner]]|Cleaner chat messages on a user's screen (speaks to owner only)}}
|}
|}
=== Footnotes ===
{{Footnotes}}

Revision as of 21:05, 14 July 2008

Chat communication is as it sounds. It is text "said" so that anyone (or anything) listening within range can hear it. It can be two-way communication.

Users can only see chat sent on the two public channels, 0 (PUBLIC_CHANNEL) and 2147483647 (DEBUG_CHANNEL); scripts on the other hand can listen to any chat on any channel. Agents can only directly chat on positive channels[1], but scripts can chat and listen on any channel. The complete range of channels is -2147483648 to 2147483647.

In the client when you begin a chat message in the chat text-entry field as /1 , the 1 is the channel you are speaking on[2].

KBtip2.png Tip: // (two forward-slashes) is shortcut for the last special channel you entered in chat.

Chat messages can be a maximum of 1023 bytes; they are truncated past that.

A scripted prim cannot hear itself speak. Scripts listening in a linked prim, though, will hear the chat. Generally, though, communication between scripts in the same object is handled via llMessageLinked.

To "hear" chat, a script has to specifically initiate a "listen." A single script has a limit of 64 listens at any one time; beyond that it will emit a "Too Many Listens" squawk, and crash. The script can manage it's listens, creating, releasing and disabling them.

Function Distance
llWhisper 10 metres
llSay 20 metres
llShout 100 metres
llRegionSay sim-wide

The distance that chat can be heard depends on the type of chat used, and where the speaker is. The sphere in which the chat can be heard is centered on the position of speaker, be that an avatar or a prim.

The above parameters are fixed; there is no way to lengthen or shorten the distance or direct it in any special direction.

llRegionSay is an exception; as it can be heard anywhere in the sim but with the limitation that it cannot broadcast on PUBLIC_CHANNEL.

User-created utility functions

•  mySay Cleaner chat messages on a user's screen
•  mySayOwner Cleaner chat messages on a user's screen (speaks to owner only)

Footnotes

  1. ^ This is likely just a limitation of the client and not an actual restriction; it should not be depended upon.
  2. ^ This is a client feature and not part of the protocol, other clients may implement this differently or not at all.