Page 1 of 2
Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 5:39 am
by fkkcloud
Hi,
Below is my response menu setup.
I am skipping player subtitles UI only after the response menu.
I want to put a delay like 1 second before NPC subtitle shows up.
How would I do that?
- 화면 캡처 2020-11-24 022705.png (46.46 KiB) Viewed 820 times
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 1:30 pm
by Tony Li
Hi,
Set the Dialogue Manager's Camera & Cutscene Settings > Default
Player Sequence to:
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 6:32 pm
by fkkcloud
With the Delay(1), it works for Response Menu only
But for the single node for the player which I am not forcing it to be response menu, it still goes into NPC subtitle after Player submit.
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 8:26 pm
by Tony Li
fkkcloud wrote: ↑Tue Nov 24, 2020 6:32 pmBut for the single node for the player which I am not forcing it to be response menu, it still goes into NPC subtitle after Player submit.
I don't understand. What should happen instead?
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 8:33 pm
by fkkcloud
So there are 2 things happening for the Player's line.
As you can see in my Dialogue Display Setting,
1) I am not showing subtitle for player when a player has more than 1 dialogue node branch.
2)I am only showing subtitle for player when the player has 1 dialogue node branch.
Delay(1) only works for 1). not for 2)
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 8:46 pm
by Tony Li
I just noticed that the Continue Button dropdown is set to Always. Please try this instead:
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 8:56 pm
by fkkcloud
That will make 2) continue without the player pressing on the Continue button.
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 9:03 pm
by Tony Li
What do you want (2) to do?
Re: Delay after Response Menu submitted
Posted: Tue Nov 24, 2020 11:17 pm
by fkkcloud
As I click on the single branched player subtitle (not the respond menu one) for the continue button, I want it to wait 1 or 2 seconds before the NPC subtitle or whatever the next node to be continued.
Re: Delay after Response Menu submitted
Posted: Wed Nov 25, 2020 9:15 am
by Tony Li
Ah, I understand now! When the dialogue UI receives the OnContinueConversation message, it immediately progresses to the next stage of the conversation (e.g., the NPC subtitle).
To do what you want, configure the continue button to wait 1-2 seconds before calling OnContinueConversation. To do this, add a simple script to the PC subtitle panel's continue button, something like this:
Code: Select all
public class DelayContinueButton : MonoBehaviour
{
public float delay = 1;
public void ContinueAfterDelay()
{
StartCoroutine(ContinueAfterDelayCoroutine());
}
IEnumerator ContinueAfterDelayCoroutine()
{
yield return new WaitForSeconds(delay);
GetComponentInParent<StandardDialogueUI>().OnContinueConversation();
}
}
Configure the button's OnClick() event to call DelayContinueButton.ContinueAfterDelay.