Page 1 of 1
Hide/suspend dialogue box
Posted: Mon Mar 12, 2018 4:11 pm
by mgregoirelds
Hello Tony,
Is there any way to delay time before an subtitle line is displayed? My use case is as follow:
- A dialogue box is shown.
- I press A to continue.
- My player is moving to another position (the dialogue box should be hidden and not displayed).
- The dialogue box is shown after the character arrives at the new position.
Thanks!
Re: Hide/suspend dialogue box
Posted: Mon Mar 12, 2018 8:05 pm
by Tony Li
Hi Maxime,
Yes. One way is to use three dialogue entry nodes. For example:
- Dialogue Text: "After you press A to continue, enter the elevator."
- Dialogue Text: (blank)
Sequence: Code: Select all
Continue()@Message(EnteredElevator)
- Dialogue Text: "Good job. Now wait while the elevator takes you to the penthouse."
This makes a few assumptions:
1. That your game will call the following C# code (or visual scripting equivalent) when the player moves to the other position:
Code: Select all
Sequencer.Message("EnteredElevator");
2. That your player has free movement during this conversation. If you disable the player's controls at the beginning of this conversation, you'll have to re-enable them during the second dialogue entry node.
3. That you're only concerned with not showing the NPC Subtitle Panel. If you need to hide the entire dialogue UI, use the SetActive() sequencer command:
- Dialogue Text: "After you press A to continue, enter the elevator."
- Dialogue Text: (blank)
Sequence: Code: Select all
SetActive(Dialogue Panel,false);
SetActive(Dialogue Panel)@Message(EnteredElevator);
Continue()@Message(EnteredElevator)
- Dialogue Text: "Good job. Now wait while the elevator takes you to the penthouse."
Re: Hide/suspend dialogue box
Posted: Tue Mar 13, 2018 8:37 pm
by mgregoirelds
Hello Tony,
Thanks, this solution should do it. I will try to implement this feature and will let you know if I get into problematic issues.
Re: Hide/suspend dialogue box
Posted: Sun Jan 26, 2020 11:11 pm
by mgregoirelds
Hello Tony,
Sorry for reviving my own pretty old thread, but is there a way to hide the Dialogue UI panel during a few seconds then reenable it using code? During a dialogue entry, I want to run some custom animations while not showing the dialogue panel then once this animation is done, I want to display it again. I want to do it using C# code, not sequencer.
I tried casting DialogueManager.dialogueUI as StandardDialogueUI then using dialogueControls.SetActive(false) and it works, but when I am calling dialogueControls.SetActive(true) later, the dialogue panel is empty and I can't continue my dialogue.
Re: Hide/suspend dialogue box
Posted: Mon Jan 27, 2020 9:34 am
by Tony Li
Hi Maxime,
Since this thread, I added the
SetDialoguePanel() sequencer command. Example:
Code: Select all
SetDialoguePanel(false);
AnimatorPlayWait(Dance)->Message(Done);
SetDialoguePanel(true)@Message(Done)
It's only implemented as a sequencer command. I can look into adding it as a C# method, too, in the next update.
Re: Hide/suspend dialogue box
Posted: Mon Jan 27, 2020 9:51 am
by mgregoirelds
That would be very helpful as during the same dialogue sequence, they may be some places where I need to hide the Dialogue UI and display it back again at a later dialogue entry.
Re: Hide/suspend dialogue box
Posted: Mon Jan 27, 2020 9:52 am
by mgregoirelds
Thanks a lot by the way.
Re: Hide/suspend dialogue box
Posted: Wed Feb 12, 2020 9:24 am
by mgregoirelds
Any ETA for the new version? We are nearing the shipping date for our title and this SetDialoguePanel method from the code could prove really useful! I could expose HandleSetDialoguePanelInternally from within my current version of DS, but if you had a proper patch, that could be useful for better upgrade later instead of relying on custom code on my side.
Re: Hide/suspend dialogue box
Posted: Wed Feb 12, 2020 10:14 am
by Tony Li
It should be out by the end of next week.