Difference between revisions of "LlPrompt"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Function |sort=Prompt |func=llPrompt |func_id=800 |func_sleep=1.0 |func_energy=10.0 |p1_type=string |p1_name=message |p1_desc=message to be displayed |p2_type=integer |p2_name=chat_c...)
 
m
 
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|sort=Prompt
|mode=request
|func=llPrompt
|func=llPrompt
|func_id=800
|func_id=800
Line 40: Line 40:
|func_helpers
|func_helpers
|also
|also
|cat1=String
|cat1
|cat2=Dialog
|cat2
|cat3=Input
|cat3
|cat4=Communications
|cat4
|cat5=Chat
|cat5
}}
}}

Latest revision as of 04:03, 2 April 2008

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llPrompt( string message, integer chat_channel );
1.0 Forced 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.

Examples

<lsl> 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);
   }

}

</lsl>

Deep Notes

Signature

//function void llPrompt( string message, integer chat_channel );