llDialog: LSL event on closing a dialog
Artesia Heartsong
LSL dialogs require a timer() event to make sure listeners aren't endlessly open.
Why not implement an extra special message when a dialog is closed? Whether it's by the Ignore button or the X. What about an empty message, is that an option? As buttons must have at least 1 character.
Log In
Nelson Jenkins
I think, syntactically, the point of the "ignore" button is to explicitly
not
send any messages to the script that sent the dialog.If you really need to close your dialog listen (in my experience the impact is, frankly, trivial as long as you're using a unique channel, such as via
llHash((string)llGetKey()) | 0x80000000
) there's always the option to create a "close" or "cancel" button yourself.Artesia Heartsong
Nelson Jenkins of course, that is how we do it today, don't we. That wasn't the point.
Nelson Jenkins
Artesia Heartsong Then what is the point? What does your proposal solve that a custom close button doesn't, aside from more easily closing a listen early that has a negligible impact when channel-separated? "Ignore" means "ignore", not "send a blank message back".
Artesia Heartsong
Nelson Jenkins My suggestion only is, that Ignore acts like an explicit Close button. That is all
JoyofRLC Acker
Id rather see a function that would allow a script to close a dialog box (eg on timeout)
WolfGang Senizen
This could be done, but risks breaking older content (admittedly badly scripted if "vulnerable" to this, but hey LL don't control that) which is something LL have an aversion to without good reason / need.
One of the issues is that the user can tp away, log out, or get disconnected. In theory the sim could keep track of every dialog sent and send the message for them if the leave, but this would still possibly break old
But in general it's been left to the scripter to manage this themselves.
Again this is something that the current lua project should improve especially with multiple timers and support for js like timeout functionality.
Artesia Heartsong
WolfGang Senizen I'd agree when someone teleports out or crashes, there is an issue here. A timer() still may be necessary. But at least it would catch explicit closure of a dialog box, upon which a script can act.
JenniWindrider Resident
WolfGang Senizen A solution might be to fire an event rather than send a message to a listener.
Artesia Heartsong
JenniWindrider Resident ye, well how they do it is actually less my concern. They do need to keep in mind there can be several dialogs open - not just for one avatar but for a few at the same time. All possible...