Adding seconds after every node

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Adding seconds after every node

Post by Kole90 »

So I want to add 2 seconds of waiting time after every node ends before the next node starts writing. Was wondering if there is an option like this. I thought that Min Subtitle Seconds is the option that I needed but it's not. I'm using typewriter effect, if you need that info maybe. Thanks :)
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding seconds after every node

Post by Tony Li »

Hi,

Here's one way:

1. Set the typewriter effect's Characters Per Second and the Dialogue Manager's Subtitle Settings > Subtitle Chars Per Second to the same value (e.g., 50). Set Subtitle Settings > Min Subtitle Seconds to 0.

2. Set the Dialogue Manager's Default Sequence to:

Code: Select all

Delay(2)@{{end}}
The value {{end}} represents the Subtitle Chars Per Second for the current text. Since the typewriter is set to the same value, this means it also represents the time at which the typewriter finishes. So the command above delays for 2 seconds, starting when the typewriter finishes.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Adding seconds after every node

Post by Kole90 »

Hey Tony, unfortunately this solution didn't work out for me. I did both things but it seems like it just removed the min delay of 2 seconds, so the "Set Subtitle Settings > Min Subtitle Seconds to 0" part only worked. Are you sure that's the right sequence command? It seems like the delay is acting the same as min delay, on shorter texts I get some sort of a pause but on longer texts it just moves on when it comes to the end without any pause. Thanks.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding seconds after every node

Post by Tony Li »

Hi,

I just tested it here. Can you post screenshots of your configuration?

My Dialogue Manager looks like this:

Image

And my NPC Subtitle Line looks like this:

Image

My example happens to use TextMesh Pro, but it's the same if you're using Unity UI.

After typing each node, it waits 5 seconds.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Adding seconds after every node

Post by Kole90 »

Here are the screenshots
Attachments
Dialogue system ss2.PNG
Dialogue system ss2.PNG (28.66 KiB) Viewed 1581 times
Dialogue system ss1.PNG
Dialogue system ss1.PNG (60.76 KiB) Viewed 1581 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding seconds after every node

Post by Tony Li »

Hi,

Do those misbehaving texts have anything in their Sequence fields? This would override the Dialogue Manager's Default Sequence.

Can you temporarily set the Dialogue Manager's Debug Level to Info and reproduce the issue? After you get to a misbehaving text, check the Console log. There will be a couple of lines starting with "Dialogue System: Sequencer:". Can you please post those here?

If you prefer, you're always welcome to send an example project to tony (at) pixelcrushers.com. I'll be happy to take a look directly.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Adding seconds after every node

Post by Kole90 »

Yeah you are right I have general overrides for all default sequences in some dialogues, I've just added your sequence to them and it works, thanks for finding out my mistake :) one question though, I removed typewriter effect from PC responses and left it for NPC responses only, how can I remove any waiting time on PC responses? Like removing {{end}} as well, I just want PC responses to appear without any waiting time at all.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding seconds after every node

Post by Tony Li »

I'm not sure I understand, but if you set the PC's Sequence (or the Default Player Sequence) to "Delay(0)" it will show the subtitle in the PC subtitle panel and then immediately move on to the next step of the conversation. If you use "None()", it will skip the subtitle entirely.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Adding seconds after every node

Post by Kole90 »

Sorry for not making it clear. So I will be using "Delay(2)@{{end}}" as a Default Sequence in Override Display Settings > Sequence Settings, so if I put "Delay(0)" to Default Player Sequence it will show the subtitle in the PC subtitle panel and then immediately move on to the next step of the conversation?

EDIT:
Yeah I just answered myself there, that was the thing I was searching for, thanks Tony :)
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Adding seconds after every node

Post by Tony Li »

Glad to help!
Post Reply