LlTextBox

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Image:Emblem-important-red.svg Pre-release Documentation Warning!

This function only appears in specific branches of the SL client source code. LL may make changes to the implementation prior to release, so this documentation may not reflect the final product, it may not even accurately represent LL's current implementation.

Contents

Summary

Function: llTextBox( key avatar, string message, integer chat_channel );
335 Function ID
1.0 Delay
10.0 Energy

Shows a dialog box on avatar's screen with the text message. It contains a text box for input, any text that is entered is said on chat_channel when the "OK" button is clicked.

• key avatar avatar UUID
• string message message to be displayed in the text box
• integer chat_channel output channel, any integer value
Channel Constant Description
DEBUG_CHANNEL 0x7FFFFFFF Chat channel reserved for script debugging and error messages.
PUBLIC_CHANNEL 0x0 Chat channel that broadcasts to all nearby users.

Caveats

  • This function causes the script to sleep for 1.0 seconds.
  • There is no way by script to kill a text box.
  • There is no way for the script to detect if the user clicked the small "ignore" button (no chat is generated as a result of pressing this button).
  • If the listening prim is out of the 20 meter range of the sending prim when the "OK" button is pressed, it will not be able to hear the response.
    • This limitation affects attachments too if the wearer moves more than 20 meters from where the listener is located.

message limits

  • If it exceeds 8 lines a scroll bar will appear.
  • message must be less than 512 bytes and not empty. Otherwise it will shout an error on DEBUG_CHANNEL.

Search JIRA for related Bugs

Examples

integer listener;
 
default
{
    touch_start(integer total_number)
    {
        llListenRemove(listener);//A previous user may not have responded. Make sure we don't leak!
        integer channel = ~(integer)llFrand(1000.0);
        listener = llListen(channel,"","","");
        llTextBox(llDetectedKey(0),"Write something here...",channel);
    }
 
    listen(integer channel, string name, key id, string message)
    {
        llSay(0,"You wrote: " + message);
        llListenRemove(listener);
    }
}

See Also

Events

•  listen

Functions

•  llDialog
•  llListen
•  llSay
•  llWhisper
•  llShout
•  llRegionSay
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
Personal tools
In other languages