[SOLVED] Various Questions

DarkTimmy

  • *
  • Posts: 462
Sorry about taking so long to get back to you both. It might be a couple more days before I have access to my own computer again, so bear with me until then.

No worries! Thanks for the reply!

-Tim
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!

Justin

  • *
  • Posts: 4634
Sorry again about taking so long to respond. I've been on sort of a mini vacation from work.

Tim:
Dialog does have a setting for pausing, but it's used by a few different commands right now (<but>, <bc>, <waitattr>, and <option>). For a user-initiated pause, you could try saving the current state of the dialog when the user pauses the game, and then restore that state when you un-pause. Here's what it would look like.

For the following code, change _DialogPaused to the internal name of a boolean in the same behavior.

Pausing code
Code: [Select]
_DialogPaused = false;
Dialog.get();
for(dgBox in Dialog.dialogBoxes)
{
if(dgBox.paused)
_DialogPaused = true;
dgBox.paused = true;
}

Unpausing code
Code: [Select]
Dialog.get();
for(dgBox in Dialog.dialogBoxes)
{
dgBox.paused = _DialogPaused;
}

I can work a more user-friendly version of this in in the future.

Photon:
Are both the toolset and engine extension installed? It might help to talk over IRC or Skype. If you want to talk over Skype, you can contact me via PM or IRC to exchange contact info.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

DarkTimmy

  • *
  • Posts: 462
had a question about this.

I have a scene where I allow the player to leave in the middle of a dialog. When the player leaves the scene in the middle and returns it seems that the dialog resumes where it left off AS WELL AS starting over. The result is a bunch of overlapping text.

Is there anyway to clear that out completely so it doesn't happen?

Best,

-Tim
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!

Justin

  • *
  • Posts: 4634
You could try using this code to end dialog prematurely. Just throw this in before the scene changes. I threw in a check so it should be fine even if dialog isn't running, too.

Code: [Select]
if(Dialog.dialogBoxes.length > 0)
{
Dialog.dialogBoxes.splice(0, Dialog.dialogBoxes.length);
Dialog.dgEnded();
}
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

DarkTimmy

  • *
  • Posts: 462
You could try using this code to end dialog prematurely. Just throw this in before the scene changes. I threw in a check so it should be fine even if dialog isn't running, too.

Code: [Select]
if(Dialog.dialogBoxes.length > 0)
{
Dialog.dialogBoxes.splice(0, Dialog.dialogBoxes.length);
Dialog.dgEnded();
}

Just make a code block and drop this in? I'll check it out right now!

Thanks!

-Tim
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!

DarkTimmy

  • *
  • Posts: 462
Hmmm - maybe that wasn't what you meant! HAHAHA
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!

Justin

  • *
  • Posts: 4634
No that's basically what I meant. Guess it didn't work.

Want to take this to IRC or Skype? I don't really want too much slow back-and-forth on the forums.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

DarkTimmy

  • *
  • Posts: 462
Sent you my Skype!
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!