Posted By

spargota on 02/03/09


menu lsl dialog secondlife

Versions (?)

Menu Handler for llDialog

 / Published in: Other

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.

  1. key owner;
  2. integer ch_dlg;
  3. integer handle_dlg;
  5. menu(string title, list buttons)
  6. {
  7. ch_dlg = (integer)(llFrand(99999.0) * -1);
  8. handle_dlg = llListen(ch_dlg,"","","");
  9. llDialog(owner, title, buttons, ch_dlg);
  10. llSetTimerEvent(60.0);
  11. }

Report this snippet  

You need to login to post a comment.