Difference between revisions of "LlDialog"

From Second Life Wiki
Jump to navigation Jump to search
Line 6: Line 6:
|func_desc=Shows a dialog box on the '''avatar''' screen with '''message''' and '''buttons'''.
|func_desc=Shows a dialog box on the '''avatar''' screen with '''message''' and '''buttons'''.
|func_footnote=When a button is pressed, the '''avatar''' chats the button text on '''chat_channel'''.
|func_footnote=When a button is pressed, the '''avatar''' chats the button text on '''chat_channel'''.
|return_text|spec
|constants=
{{{!}}
{{!}}
{{{!}}{{Prettytable}}
{{!}}-{{Hl2}}
! colspan="4" {{!}} Button Order
{{!}}-
{{!}}9  
{{!}}10
{{!}}11
{{!}}12
{{!}}-
{{!}}5
{{!}}6
{{!}}7
{{!}}8
{{!}}-
{{!}}1
{{!}}2
{{!}}3
{{!}}4
{{!}}}
{{!}}
{{LSL Constants/Chat}}
{{!}}}
|spec
|caveats=
|caveats=
*There is no way by script to kill a dialog box.
*There is no way by script to kill a dialog box.

Revision as of 04:46, 1 March 2007

Summary

Function: llDialog( key avatar, string message, list buttons, integer chat_channel );
1.0 Forced Delay
10.0 Energy

Shows a dialog box on the avatar screen with message and buttons.

• key avatar
• string message
• list buttons
• integer chat_channel

When a button is pressed, the avatar chats the button text on chat_channel.

Button Order
9   10 11 12
5 6 7 8
1 2 3 4
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

  • This function causes the script to sleep for 1.0 seconds.
  • There is no way by script to kill a dialog 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).
  • There is no way to distinguish the input from a dialog box and regular chat made by the same user.

message limits

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

buttons limits

  • If buttons is an empty list, it will default to as if it were ["OK"].
  • No more then 12 buttons can be requested and they must all be strings. Other wise it will shout an error on DEBUG_CHANNEL.
  • Button text cannot be longer then 24 bytes per button. Other wise it will shout an error on DEBUG_CHANNEL.

Examples

Deep Notes

Signature

function void llDialog( key avatar, string message, list buttons, integer chat_channel );