Return to Snippet

Revision: 11367
at February 5, 2009 10:55 by spargota


Updated Code
key owner;
integer ch_dlg;
integer handle_dlg;

menu(string title, list buttons)
{
    ch_dlg = (integer)(llFrand(99999.0) * -1);
    handle_dlg = llListen(ch_dlg,"","","");
    llDialog(owner, title, buttons, ch_dlg);
    llSetTimerEvent(60.0);
}

Revision: 11366
at February 3, 2009 12:39 by spargota


Initial Code
key owner;
integer ch_dlg;
integer handle_dlg;

menu(string title, list buttons)
{
    ch_dlg = (integer)(llFrand(99999.0) * -1);
    handle_dlg = llListen(ch_dlg,"","","");
    string menu_txt = "\n\nPost: " + post_name + "\nStatus: " + status() + "\n\n" + title;
    llDialog(owner, menu_txt, buttons, ch_dlg);
    llSetTimerEvent(60.0);
}

Initial URL

                                

Initial Description
Generic llDialog menu handler for Linden Scripting Language (LSL).  Insert into the top of your LSL script.

llSetTimerEvent is used to control lag by shutting down the listen after 60 seconds.  You must add 

llSetTimer(0.0);
llListenRemove(handle_dlg);

to the timer() event to use this functionality.  The llSetTimerEvent(60.0) may be removed otherwise.

Initial Title
Menu Handler for llDialog

Initial Tags

                                

Initial Language
Other