acomerlaaa Ibor Posted April 6, 2012 Share Posted April 6, 2012 hello, i want to lunch a llDialog only if there isnt another llDialog already open, is there any way to make it? i think if (!llDialog) or if (llDialog != NULL) but doesnt works. Thanks for your time. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted April 6, 2012 Share Posted April 6, 2012 No, there is no way to detect if a dialog is open. What you can do is to close the listener with a timer if the dialog hasn't been used. Link to comment Share on other sites More sharing options...
Franklin Serpente Posted April 6, 2012 Share Posted April 6, 2012 Along with the timer idea, if you really want to make sure you don't have multiple dialog 's open you can set a flag (DIALOG =TRUE) when activated, and DIALOG =FALSE when closed. Just test the condition before the call to llDialog(). Link to comment Share on other sites More sharing options...
acomerlaaa Ibor Posted April 6, 2012 Author Share Posted April 6, 2012 and there is any way to close all llDialog so i close all before launch the next one? Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted April 6, 2012 Share Posted April 6, 2012 No Link to comment Share on other sites More sharing options...
Ela Talaj Posted April 6, 2012 Share Posted April 6, 2012 If you use some kind of a flag to check if a dialog is already opened like it was suggested in other replies, you will not have more than one dialog open at a time so no need to be concerned with more than one. I usually store user id (key) when the dialog opens and clear it (set to NULL_KEY) when it closes, but a simple flag DIALOG = TRUE/FALSE would do just fine. Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 6, 2012 Share Posted April 6, 2012 The answers posted here are really all you can do. If you'd like to get more confused and frustrated, though, take a look here >>> http://www.sluniverse.com/php/vb/scripting/69820-lldialog-replacing-itself.html :smileyfrustrated: Link to comment Share on other sites More sharing options...
Nova Convair Posted April 8, 2012 Share Posted April 8, 2012 If the dialog user presses the "ignore" button NO message is generated so the script does not know whether the dialog is open or not. If a flag is used then it will flag the dialog open while it is closed. So you always need a timer to clean up. There is at least a listen to close. And in case of the above mentioned flag usage - nobody can use the dialog until the timer runs out. You can add a "cancel" button of course but there is no guarantee that the "ignore" button isn't used so you have to be prepared for that. 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