Forcing a dialog to close?

oripessach

  • *
  • Posts: 259
Hi,

My game displays a dialog at the beginning of some scenes. If that dialog is open and the user manages to exit the current scene (not hard to do) while the dialog is open, the next scene will display two dialogs, on top of each other.

I'm trying to address that by forcing the current dialog to close, but I can't find an interface for doing that. What am I missing?

Justin

  • *
  • Posts: 4716
Code: [Select]
for(dialogBox in dialog.core.Dialog.dialogBoxes)
{
   dialogBox.endMessage();
}
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

oripessach

  • *
  • Posts: 259
Thanks! That works beautifully.

This should really be a block, I think...

Justin

  • *
  • Posts: 4716
Eventually, they will be blocks. This code snippet is requested quite often.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)