LlPrompt

From Second Life Wiki

Second Life Wiki > LlPrompt
Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/fr Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ja 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-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Contents

Summary

Function: llPrompt( string message, integer chat_channel );
REQUEST Function ID
1.0 Delay
10.0 Energy

Prompt the user for a string. If provided and user presses OK, the string is shout by the avatar on the chat channel.

• string message message to be displayed
• integer chat_channel output channel

If user provides no string and presses OK, an empty string is returned. If the user presses CANCEL, no string is shout on the output channel.

Caveats

  • This function causes the script to sleep for 1.0 seconds.

Search JIRA for related Bugs

Examples

 
default
integer channel = 1000;
 
default
{
    state_entry()
    {
        llListen(channel,"", "","");
    }
 
    touch_start(integer count)
    {
        llPrompt("Please, tell me your REAL name (first life).", channel);
    }
 
    listen(integer chan, string name, key id, string mes)
    {
        if(id == llGetOwnerKey(id))//won't listen to objects unless they aren't in the region.
            llSay(0,"Your real name is " + mes);
    }
}
 

Deep Notes

In other languages