Jump to content

Help Needed with llLISTEN


Hills90210 Beverly
 Share

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

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

Recommended Posts

 

can somebody tell me what the problem here is please,

the code works fine... its just problematic when i pick the object up and rez it again,

then it doesnt seem to be listening.

------

even if i reset the script by hand or in the code...it wont work, i literaly got to press the SAVE button in order to make it work/listen again.

------

 

list choices = ["grass 1","grass 2","grass 3","grass 4","grass 5","sand 1","sand 2","snow","planks"];
string msg = "\nChoose a Scene";
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, choices, channel_dialog);
    listen_id = llListen( channel_dialog, "", ToucherID, "");
    llSetTimerEvent(60);

 }
 
  listen(integer channel, string name, key id, string choice) { 
       llSay(0,"setting scene: " + choice);
       llSetTimerEvent(0.0);
       llListenRemove(listen_id);
            if(choice == "grass 1")
            {
                llSetLinkTexture(12,"brickwall052b", 5); // wall
                llSetLinkTexture(11,"[VT] Grass (13)", 0); // floor
                llSetLinkTexture(14,"16804727-e378-e4ac-8262-494b1fa0d1ba", 0); // pool front
                llSetLinkTexture(14,"16804727-e378-e4ac-8262-494b1fa0d1ba", 3); // pool side            
                llSetLinkTexture(13,"9429d61c-6b16-5e8f-d9e2-37e26f8f3e55", 5); // inside pool side
                llSetLinkTexture(1,"9429d61c-6b16-5e8f-d9e2-37e26f8f3e55", 0); // inside pool floor
            }
            else if(choice == "grass 2")
            {
                llSetLinkTexture(12,"SFVGBRICKWALL1364 IVY 54", 5); // wall
                llSetLinkTexture(11,"0a76db99-0197-93b7-c24a-162e7820513c", 0); // floor
                llSetLinkTexture(14,"e0e362bf-1f8f-47d6-3892-00db0a1d77bc", 0); // pool front
                llSetLinkTexture(14,"e0e362bf-1f8f-47d6-3892-00db0a1d77bc", 3); // pool side
                llSetLinkTexture(13,"4fd33777-c84b-8ce7-c4e5-889160c68873", 5); // inside pool side
                llSetLinkTexture(1,"4fd33777-c84b-8ce7-c4e5-889160c68873", 0); // inside pool floor
            }
            else if(choice == "grass 3")
            {
                llSetLinkTexture(12,"xr - wood screen 28 Bonus 2", 5); // wall
                llSetLinkTexture(11,"grass", 0); // floor
                llSetLinkTexture(14,"5d154893-b585-dbff-4a48-3006addae03a", 0); // pool front
                llSetLinkTexture(14,"5d154893-b585-dbff-4a48-3006addae03a", 3); // pool side
                llSetLinkTexture(13,"a7a1bba4-0ad1-caba-177e-e65fb46470a4", 5); // inside pool side
                llSetLinkTexture(1,"a7a1bba4-0ad1-caba-177e-e65fb46470a4", 0); // inside pool floor
            }
            else if(choice == "grass 4")
            {
                llSetLinkTexture(12,"SFVGBUSH4100", 5); // wall
                llSetLinkTexture(11,"46906dcc-80e1-1fa9-3fec-58880e14a1bc", 0); // floor
                llSetLinkTexture(14,"f96437dd-6bd0-ac3e-839b-e19a74fdd461", 0); // pool front
                llSetLinkTexture(14,"f96437dd-6bd0-ac3e-839b-e19a74fdd461", 3); // pool side
                llSetLinkTexture(13,"2dee2f0d-cd04-4785-cf94-3eace0f980b0", 5); // inside pool side
                llSetLinkTexture(1,"2dee2f0d-cd04-4785-cf94-3eace0f980b0", 0); // inside pool floor
            }
            else if(choice == "sand 1")
            {
                llSetLinkTexture(12,"Wood Fence 1 Size 1000 x 547", 5); // wall
                llSetLinkTexture(11,"sand", 0); // floor
                llSetLinkTexture(14,"28b42c62-09ec-b1fd-e18c-bf3de16c6674", 0); // pool front
                llSetLinkTexture(14,"28b42c62-09ec-b1fd-e18c-bf3de16c6674", 3); // pool side
                llSetLinkTexture(13,"9b187dd2-cee2-7005-e34f-524838e03311", 5); // inside pool side
                llSetLinkTexture(1,"9b187dd2-cee2-7005-e34f-524838e03311", 0); // inside pool floor
            }
            else if(choice == "sand 2")
            {
                llSetLinkTexture(12,"c3cb3c57-06b6-8575-2d79-9482f618edb9", 5); // wall
                llSetLinkTexture(11,"a00df0c1-3b81-1c7c-fe95-7e08d2ce46bd", 0); // floor
                llSetLinkTexture(14,"e0e362bf-1f8f-47d6-3892-00db0a1d77bc", 0); // pool front
                llSetLinkTexture(14,"e0e362bf-1f8f-47d6-3892-00db0a1d77bc", 3); // pool side
                llSetLinkTexture(13,"4fd33777-c84b-8ce7-c4e5-889160c68873", 5); // inside pool side
                llSetLinkTexture(1,"4fd33777-c84b-8ce7-c4e5-889160c68873", 0); // inside pool floor
            }
             else if(choice == "planks")
            {
                llSetLinkTexture(12,"LDPW_EDG_Shire_Roof_Grass", 5); // wall
                llSetLinkTexture(11,"planks", 0); // floor
                llSetLinkTexture(14,"de9e2e86-bcda-05e9-1ba4-9977b727efcc", 0); // pool front
                llSetLinkTexture(14,"de9e2e86-bcda-05e9-1ba4-9977b727efcc", 3); // pool side
                llSetLinkTexture(13,"925a5bc3-f00f-b197-5acd-5471bdb1b302", 5); // inside pool side
                llSetLinkTexture(1,"925a5bc3-f00f-b197-5acd-5471bdb1b302", 0); // inside pool floor            
            }  
             else if(choice == "snow")
            {
                llSetLinkTexture(12,"Ice Wall Bricks Seamless Texture", 5); // wall
                llSetLinkTexture(11,"Primitive Island - Snow 3", 0); // floor
                llSetLinkTexture(14,"6124a972-ff11-0eb5-e841-fb05ae059813", 0); // pool front
                llSetLinkTexture(14,"6124a972-ff11-0eb5-e841-fb05ae059813", 3); // pool side            
                llSetLinkTexture(13,"TilesSmall6", 5); // inside pool side
                llSetLinkTexture(1,"TilesSmall6", 0); // inside pool floor
            }     
             else if(choice == "grass 5")
            {
                llSetLinkTexture(12,"SFVGBRICKWALL3314 LR", 5);
                llSetLinkTexture(11,"Islands - Grass short", 0);
                llSetLinkTexture(14,"e0e362bf-1f8f-47d6-3892-00db0a1d77bc", 0); // pool front
                llSetLinkTexture(14,"e0e362bf-1f8f-47d6-3892-00db0a1d77bc", 3); // pool side            
                llSetLinkTexture(13,"ffd8978b-bd1d-bb3d-a1b0-254dc5596a97", 5); // inside pool side
                llSetLinkTexture(1,"ffd8978b-bd1d-bb3d-a1b0-254dc5596a97", 0); // inside pool floor
            }
            else {
        llListenRemove(listen_id); 

    }
  }

  timer() {

    llListenRemove(listen_id);
    llWhisper(0, "Sorry. You snooze; you lose.");
    llSetTimerEvent(0.0); //Stop the timer from being called repeatedly
  }
}

 

Link to comment
Share on other sites


Hills90210 Beverly wrote:

 

can somebody tell me what the problem here is please,

the code works fine... its just problematic when i pick the object up and rez it again,

Hi, is this script in a large linked object? The take and re-rez trouble makes me think of SCR-43, "Listeners in child prims get positioned at root prim position first, then switch to child prim position after re-rez (resulting in wrong listener / whisper radius)".

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4544 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...