Communications
These are
functions and
events that allow
scripts to communicate with
users, other scripts, and with scripts and programs running on computers outside
SL. Depending on what you're trying to do, you may have some leeway when choosing which methods to use. When faced with a choice,
these benchmarks can demonstrate the performance differences of one method over another.
Q: How do I know which method to use? This is complicated!
A: Consult the following chart of methods and who or what can recieve them:
Method | Script Delay | Object owner | Other users | Other prims | Scripts in the same prim | Send to computers outside SL | Receive from outside SL | Maximum Payload (characters) | Comment |
Chat: Whisper, Say, Shout | No | Yes | Yes | Yes | No | No | No | 1023 | Must be within chat distance to be able to receive. |
Chat: llRegionSay | No | No | No | Yes | No | No | No | 1023 | Simwide, does not work on channel 0. |
llOwnerSay | No | Yes | No | No | No | No | No | 1023 | Owner must be in the same sim. |
llDialog Create | Yes | Yes | Yes | No | No | No | No | 512 | Only the directed user can receive and they must be in the sim. |
llDialog Response | No | Yes | Yes | Yes | No | No | No | 1023 | Receiver must be within chat distance of where the dialog box was created. |
Instant Messages | Yes | Yes | Yes | No | No | No | No | 1023 | |
Link Messages | No | No | No | No | Yes | No | No | limited only by memory (~8000 max. in practical use) | Only scripts contained within a given linked object may receive. |
Email | Yes | No | No | Yes | Yes | Yes | Yes | 1000 | link messages are better for intra-object communication. |
XML-RPC | No | No | No | No | No | No | Yes | 255 + one 32-bit integer | Only connections from an external computer to SL can be initiated. |
HTTP | No | No | No | No | No | Yes | Yes | 2048 | Only connections from SL to a non-Linden Lab server can be initiated. You must have a script on external server (whether in PHP or MySQL or *CGI) to process the GET or POST data sent by llHTTPRequest() |
There are also several
alternatives to these methods of communication, but they have a limited number of uses.
Q: So I want my attachment to talk to me and only me. What should I use?
A: llOwnerSay. If you need it to silently communicate with another user, use llInstantMessage. Remember that you can use multiple communications methods in the same script.
Functions |
Events |
Chat |
Email |
XML-RPC