Jump to content

llDialog or Dialog timing out


AbaKayDabra
 Share

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

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

Recommended Posts

Can someone point me to a place that would explain the process of these menus "timing out".  What I have experienced is that some of these llDialogs wait almost indefinatly for a button click and other seem to only be active for about 15 seconds.  I assume it has something to do with the corresponding listener event but I'm having a mental block on understanding it.  

For instance I have an emote hud that I want to pop up a llDialog box to pick a facial emotion.  I would like the llDialog box to remain indefinatly so a second button could be pressed to start a different facial emote even if it is 5 min. later.  Is this possible?

Link to comment
Share on other sites

The llDialog function only opens a dialog box.  It will stay open forever unless:

1.  The use clicks a choice (including the ignore button) in the dialog, or

2.  The dialog box is replaced by another dialog box.

When a dialog box is opened, it remains active as long as it is open unless the script has closed the listen handler that is waiting for a response from it.  Even then, the dialog box will stay open, just inactive. So, if you want to make a dialog box inactive, all you need is a timer event  like so:

timer(){    llSetTimerEvent(0.0);    llListenRemove(gLsn);  // Where gLsn is the global integer name of your listen handler}

Set the timer event when you open the dialog.  Read the full description in the LSL wiki.

If you want to re-open a dialog box so that the user can make a second choice after having already used a previous dialog box, you just have to open it in the listen event that gets the response from the first dialog.

Link to comment
Share on other sites

I think you're confusing the idea of getting a dialog box to stay open with that of a listener timing out.

Rolig has explained to you how to time out a listener.

If you want to keep the dialog box open -- in fact, to cause it to re-open after you've clicked it -- you simply re-open it in the listen event after you've processed the preceding message, thus

	listen(integer channel, string name, key id, string message) {		//process the message, and then...		llDialog(id, "Please make another choice." ["A","B","C"], channel);		//open the same menu	}

That will keep the menu open until you click the ignore button at bottom right to dismiss it.

In the example you describe, a HUD that only the wearer can use, I probably wouldn't bother turning the listener on and off.   Simply open a listener when you attach it, using a very negative channel and listening only to the owner, and keep listening all the time.

Or you could not bother with listeners at all -- make a single texture showing the various emotes you want to play, in a gride, put that on one face of the HUD, and then use either  llDetectedTouchUV or llDetectedTouchST to detect which one you've clicked.   That's probably how I would make it.

Link to comment
Share on other sites

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