Listen

From Second Life Wiki
Revision as of 02:31, 15 March 2007 by Ina Centaur (talk | contribs) (the most basic listen example (amazed it's not here already..))
Jump to navigation Jump to search

Description

Event: listen( integer channel, string name, key id, string message ){ ; }

Trigged by chat, use llListen to enable and filter

• integer channel
• string name
• key id
• string message
Channel Constant Description
DEBUG_CHANNEL 0x7FFFFFFF Chat channel reserved for script debugging and error messages, broadcasts to all nearby users.
PUBLIC_CHANNEL 0x0 Chat channel that broadcasts to all nearby users. This channel is sometimes referred to as: open chat, local chat and public chat.

Caveats

  • On state change all listens are released.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> // says beep whenever owner says something in main chat; string owner = "Your Name"; // replace Your Name with your name ; default {

   state_entry()
   {
       llListen(0, owner, "", "");
   }
   listen( integer channel, string name, key id, string message ){
       llSay(0,"beep");
   }

} </lsl>

See Also

Functions

•  llListen
•  llListenControl
•  llListenRemove
•  llDialog
•  llWhisper Sends chat limited to 10 meters
•  llSay Sends chat limited to 20 meters
•  llShout Sends chat limited to 100 meters

Deep Notes

Signature

event void listen( integer channel, string name, key id, string message );