Page 1 of 1

Disable continue button while Adventure Creator is paused

Posted: Thu Oct 21, 2021 6:42 pm
by gblekkenhorst
I'm using a combo of Dialogue System and Adventure Creator. When Adventure Creator is paused, it's still possible to click the continue button, which cancels the conversation and because of the way our game is set up, you can never revisit the cut scene. I thought the easiest way to disable everything would be to just add a raycast target panel behind ACs pause menu, but it looks like it's building the pause menu in a way I don't understand.

Is there something I can do to the continue button (or all of dialogue creator) to make it unresponsive when AC is paused?

Re: Disable continue button while Adventure Creator is paused

Posted: Thu Oct 21, 2021 7:56 pm
by Tony Li
Hi,

Try disabling the Dialogue Manager Canvas's Graphic Raycaster when AC is paused.

Re: Disable continue button while Adventure Creator is paused

Posted: Sat Jan 08, 2022 2:27 pm
by gblekkenhorst
This worked great! However we also have space and enter trigger dialogue progression, so we need to disable that as well. Is there a function in dialogue system we can call to disable listening for input or something similar that we can activate and deactivate from AC's pause events?

Re: Disable continue button while Adventure Creator is paused

Posted: Sat Jan 08, 2022 3:05 pm
by Tony Li
Hi,

It depends on what causes Space and Enter to trigger dialogue progression.

If your continue button has a UI Button Key Trigger component, set the static property UIButtonKeyTrigger.monitorInput to false. When the pause menu closes set it back to true.

If the continue button is the EventSystem's current selection and the "Submit" input (mapped by default to Space and Enter) is triggering it, set the static property UIPanel.monitorSelection to false, and deselect the current selection using UnityEngine.EventSystem.EventSystem.current.SetSelectedGameObject(null).

Re: Disable continue button while Adventure Creator is paused

Posted: Wed Jan 12, 2022 4:52 pm
by gblekkenhorst
This fixed everything up, thanks!

Re: Disable continue button while Adventure Creator is paused

Posted: Wed Jan 12, 2022 5:39 pm
by Tony Li
Glad to help! :-)