Hello again, I feel somehow inadequate since I seem to be the only one with this issue (and it's probably something obvious that I am missing), but when the last line of my dialog plays, I want to make sure the player has a chance to read it. Obviously I could do it by asking for player input, but I would also like to be able to set a condition for waiting until the whole response has been displayed on screen (followed by a small time delay) before gameplay resumes.
Also, I tried finding the settings for changing text speed in the DialogueManager but was unsuccessful.
Thanks,
-Jeff
Last NPC response gets cut short while conversation is ended
Re: Last NPC response gets cut short while conversation is ended
Hi Jeff,
When the conversation is on a dialogue entry node, its Dialogue Text stays onscreen until its Sequence is done. If the dialogue entry node's Sequence field is blank, it uses the Dialogue Manager GameObject's Default Sequence (which you can find in Display Settings > Camera Settings > Default Sequence).
The Default Sequence is:
which simply waits for a duration based on the length of the Dialogue Text and some timing values set on the Dialogue Manager's Display Settings > Subtitle Settings > Subtitle Chars Per Second and Min Subtitle Seconds. (You can change the Default Sequence if you want.)
Let's say Subtitle Chars Per Second is set to 30. If your Dialogue Text is 90 characters, the Default Sequence will wait for 90/30 = 3 seconds. If you want to wait for 5 seconds instead, set the dialogue entry node's Sequence to:
Most people just do this. However, if you want to get more programmatic, you can use the "->Message" and "@Message" syntax in your Sequence. The "->Message" syntax sends an arbitrary message string to your sequence. The "@Message" syntax waits until it receives a message string. So, for example, to wait for 2 extra seconds:
The first line waits for the regular {{end}} duration. When it's done, it sends a "Done" message to the sequencer. The second line waits until it receives a "Done" message, and then delays an additional 2 seconds.
Another twist to this whole topic is that the typewriter effect, if you're using it, uses an entirely different Chars Per Second than the Dialogue Manager's Display Settings > Subtitle Settings. This is intentional. It lets you separate the speed of the typewriter from the duration of the dialogue entry node. Typically your typewriter Chars Per Second should be faster (higher) than the Dialogue Manager's Subtitle Settings. This allows the typewriter to finish typing before the end of the dialogue entry node's duration. In fact, increasing the typewriter's Chars Per Second or decreasing the Dialogue Manager's Subtitle Chars Per Second may be all that you need to do to get the effect you want.
When the conversation is on a dialogue entry node, its Dialogue Text stays onscreen until its Sequence is done. If the dialogue entry node's Sequence field is blank, it uses the Dialogue Manager GameObject's Default Sequence (which you can find in Display Settings > Camera Settings > Default Sequence).
The Default Sequence is:
Code: Select all
Delay({{end}})
Let's say Subtitle Chars Per Second is set to 30. If your Dialogue Text is 90 characters, the Default Sequence will wait for 90/30 = 3 seconds. If you want to wait for 5 seconds instead, set the dialogue entry node's Sequence to:
Code: Select all
Delay(5)
Code: Select all
Delay({{end}})->Message(Done);
Delay(2)@Message(Done)
Another twist to this whole topic is that the typewriter effect, if you're using it, uses an entirely different Chars Per Second than the Dialogue Manager's Display Settings > Subtitle Settings. This is intentional. It lets you separate the speed of the typewriter from the duration of the dialogue entry node. Typically your typewriter Chars Per Second should be faster (higher) than the Dialogue Manager's Subtitle Settings. This allows the typewriter to finish typing before the end of the dialogue entry node's duration. In fact, increasing the typewriter's Chars Per Second or decreasing the Dialogue Manager's Subtitle Chars Per Second may be all that you need to do to get the effect you want.
Re: Last NPC response gets cut short while conversation is ended
Tony, top notch and thorough answer. Nailed it. Your quick feedback is greatly appreciated. Your help makes a big difference in putting all the pieces together quicker. Can't wait to acquire love /hate as well once we have a proper NPC setup going.
Cheers!
-Jeff
Cheers!
-Jeff
Re: Last NPC response gets cut short while conversation is ended
Always happy to help!