LepreKhaun Posted August 1, 2013 Share Posted August 1, 2013 If any of you new scripters ever get confused about the correct way to keep track of listeners, you only need to study and understand https://wiki.secondlife.com/wiki/Dialog_Menus, where some of the top minds in LSL scripting have worked it out for you. Pay particular attention to the section Further Listener Removal, since this covers an aspect that is often overlooked by those that have begun to think there's nothing left to learn. Link to comment Share on other sites More sharing options...
Xiija Posted August 1, 2013 Share Posted August 1, 2013 I also use a toggle, to keep others from closing a listen that is being used by the original toucher..... touch_start(integer num_detected) { ToucherID = llDetectedKey(0); if(tog == 1){llSay(0,"In Use"); } else { tog = 1; llListenRemove(listenHandle); // It doesn't matter if we try closing an already closed, or non-existent listener listenHandle = llListen(dialogChannel, "", ToucherID, ""); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSetTimerEvent(60.0); // Here we set a time limit for responses } } // then reset the toggle when the listen is closed, and in the timer // this allows only one user at a time, if you needed more, you could // open a new listener and add one to the channel after comparing // id's ? 1 Link to comment Share on other sites More sharing options...
LepreKhaun Posted August 1, 2013 Author Share Posted August 1, 2013 I like that approach, a bit friendlier than just silently locking one of the touchers out when that "game of tag" arises. Link to comment Share on other sites More sharing options...
Recommended Posts
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