Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

removing a dialogue popup that times out

Lotka Zagoskin
Registered User
Join date: 30 Sep 2006
Posts: 40
10-29-2006 23:21
i know about removing the listen event thing using llListenRemove on the handle, but can someone point me at a script which removes a dialogue which times out and the user hasn't clicked the "ignore" option? can you do that?

should a state change away from the state that created the dialogue close it down?

thanks.
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
10-29-2006 23:38
Actually, once you launch the dialog using llDialog, it's out of the hands of the script. Untill they click on something and either ignore the dialog, or send data back to the listen event, there's nothing the script can do itself.

At least directly. Now, a thought crossed my mind of sending an empty dialog, but that would just prompt with a second dialog and not dismiss the first. perhaps someone else has an idea of something that might work?

I suspect it isn't possible.
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
10-30-2006 02:34
Actually, as stated before, there is nothing you can do about a dialogue popup once it has been launched. The best option, in my option, is to accept that and prepare for it.

If you do not want someone to use the menu after a given time has passed, close the listener after a timeout and use a random channel each time you spawn the listener anew. This way an old popup will not affect your script anymore and if it is blocking the other person's HUD is beyond the point where *I* care :)

So I do it like this:

If touched reset timer to timeout seconds, check if we are still using a listener (nonzero handle). If so, reuse exisiting listener else spawn a new one with a *random* channel number.

If the timeout occurs (after noone has touched the thing for timeout seconds) close listener and set handle to zero.

If you use a large enough range for the random channels it is highly unlikely that old menu popups will affect your script.