FANDOM


SyntaxEdit

llWhisper(integer channel, string message);

Whispers the text specified as message on the specified channel.

Parameters

integer channel
any integer value, integer variable or chat channel constant
string message
any string value or string variable with maximal 1023 characters

Returns void

This function doesn't return a result.

Constants

Those constants can be used as channels

constant value description
PUBLIC_CHANNEL0value of the public chat channel
DEBUG_CHANNEL2147483647value of the debug channel

Example

Whispers "I whisper to you..." in the public chat when the object is touched:

default 
{
	touch_start(integer number)
	{
		llWhisper(PUBLIC_CHANNEL, "I whisper to you...");
	}
}

Remarks

This function is used, to broadcast messages to avatars and objects on a specific channel.

Avatars can hear only messages send to the PUBLIC_CHANNEL or DEBUG_CHANNEL. Objects are able to hear messages send to any channel. For objects, to receive those messages, they have to llListen() to the channel the message is send.

The message can be heard only within an area that equals a sphere with a radius of 20 meters from the center of the prim, that contains the script.

To whisper a message on the public chat, the PUBLIC_CHANNEL constant or the number 0 has to be used as channel.

llWhisper(PUBLIC_CHANNEL, "You can read this on the public chat. ");

Like avatars, objects are able to send "/me" messages on PUBLIC_CHANNEL too.

llWhisper(0, "/me is whispering...");

To send a message to another object, any channel can be used. The PUBLIC_CHANNEL and DEBUG_CHANNEL should be avoided for inter-object communication. Any other channel is considered private and is fine to be used. A negative channel should be used, when it's not desired that users would be able to send such messages to this channel too.

llWhisper(-48827300, "Only objects can hear this.");

The DEBUG_CHANNEL exists, so that objects can send messages that will be displayed in the script warning/error window of the client, similar as script errors are displayed. It can be used to report errors or for debugging purposes.

llWhisper(DEBUG_CHANNEL, "Notice: This is a debugging message.");

Notes

Messages that are longer then 1023 bytes, are truncated to 1023 bytes.

The message is not broadcasted to scripts belonging to the same prim, that sends it. This is relevant when it comes to listen to messages, as that helps to prevent infinite recursion.

For positive channels, this is similar to an user typing "/### message" (where ### is a number) in the client, as example "/1 show". Negative channels can't be used in that way.

The possible chat channel range for scripts is from -2147483648 to 2147483647.

More Examples / Code Snippets

Related Functions

  • llSay() - Send a message up to a distance of 20m
  • llShout() - Send a message up to a distance of 96m
  • llRegionSay() - Send a message to the whole region
  • llOwnerSay() - Sends a chat message only visible to the owner of an object
  • llInstantMessage() - Sends a private chat message to a specific avatar

Related Events

  • listen - Listens to messages on watched channels

Platforms

SecondLife (agni), Secondlife (aditi), OpenSimulator

See alsoEdit

  • llMessageLinked() - to be used for more efficient communication between the linked prims of an object.
  • llEmail() - to be used for communicating directly with a specific object within the same or a different simulator, as also sending regular emails.
  • llListen() - creates a listener to watch for messages on a specific channel
  • llDialog() - creates a dialog, which broadcasts the text of the pressed button similar to llSay()
  • Chat category
  • Communication category
  • Channels used by specific script libraries
  • llWhisper - Function reference at SecondLife LSL Wiki
  • llWhisper - Function reference at lslwiki.net


  Icon-edit-22x22 Read comments or write a new one!    

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.