daily pastebin goal
19%
SHARE
TWEET

Dialog with submenu example

LethBaumann Jan 10th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer gListener;
  2.  
  3.  
  4. default
  5. {
  6.     state_entry()
  7.     {
  8.        
  9.     }
  10.  
  11.     touch_start(integer total_number)
  12.     {
  13.         llListenRemove(gListener);
  14.         key user = llDetectedKey(0);
  15.         gListener = llListen(-199, "", user, "");
  16.         llDialog(llDetectedKey(0), "\nSelect an option", ["Yes", "No" ] , -199);
  17.         llSetTimerEvent(60.0);
  18.     }
  19.     listen(integer chan, string name, key id, string msg)
  20.     {
  21.         if (msg == "Yes")
  22.         {
  23.             llDialog(id, "\nSelect an option", ["1", "2" ] , -199);
  24.         }
  25.         if (msg == "No")
  26.         {
  27.             //Just do nothing, close dialog. This whole if statement doesnt even need to be
  28.         }
  29.         if (msg == "1")
  30.         {
  31.             llSay(0,"You picked 1");
  32.         }
  33.         if (msg == "2")
  34.         {
  35.             llSay(0,"You picked 2");
  36.         }
  37.         llSetTimerEvent(0.1);        
  38.     }
  39.     timer()
  40.     {
  41.         llListenRemove(gListener);
  42.         llSetTimerEvent(0.0);
  43.     }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top