Jump to content

dialog menus - second life wiki


Urzul
 Share

You are about to reply to a thread that has been inactive for 4498 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

list colourchoices = ["-", "Red", "Green", "Yellow"];
string msg = "Please make a choice.";
key ToucherID;
integer channel_dialog;
integer listen_id;
 
default{
  state_entry() {
    channel_dialog = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) );
  }
 
  touch_start(integer total_number) {
    ToucherID = llDetectedKey(0);
    llDialog(ToucherID, msg, colourchoices, channel_dialog);
    listen_id = llListen( channel_dialog, "", ToucherID, "");
    llSetTimerEvent(60); //HERE WE SET A TIME LIMIT
  }
 
  listen(integer channel, string name, key id, string choice) { 
    if (choice == "-") {
     llDialog(ToucherID, msg, colourchoices, channel_dialog); 
    }
    else if (choice == "Red") {
        //do something
        llListenRemove(listen_id); //HERE WE ARE BEING RESPONSIBLE
    }
    else if (choice == "Green") {
        //do something
        llListenRemove(listen_id); //HERE WE ARE BEING RESPONSIBLE
    }
    else {
        //do something else.
        llListenRemove(listen_id); //HERE WE ARE BEING RESPONSIBLE
    }
  }
 
  timer() { //TIME’S UP!
    llListenRemove(listen_id);
    llWhisper(0, "Sorry. You snooze; you lose.");
    llSetTimerEvent(0.0); //Stop the timer from being called repeatedly
  }
}

 this is a nice script but it does nothing when i touch the prime :matte-motes-impatient:

i cant touch it fist ...

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4498 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...