Hello,
I am trying to add a fast forward function to move towards the dialogue really fast (not skipping!) until it meets the player choice.
What would be the most ideal way/case/example to do this with the Dialogue System?
Thank you!
Adding a fast forward function for a Dialogue Scene
Re: Adding a fast forward function for a Dialogue Scene
Hi,
If your dialogue UI does not use a typewriter effect, you can add a script with an OnConversationLine method to the Dialogue Manager. Something similar to:
If your dialogue UI uses a typewriter effect and you want to speed up the typewriter, you can use a script to speed up the typewriter effect and set DialogueManager.displaySettings.subtitleSettings.subtitleCharsPerSecond and minSubtitleSeconds. See this post for information on how to change the typewriter speed in code.
The game Gestalt: Steam & Cinder, for example, lets you hold down a joystick button or key to speed up lines of dialogue. When you press the button, it sets the typewriter speed and subtitleCharsPerSecond to 200 characters per second, and adds Continue()@{{end}} to the sequence. When you release the button, it returns to the original speed and leaves the original sequence untouched.
If your dialogue UI does not use a typewriter effect, you can add a script with an OnConversationLine method to the Dialogue Manager. Something similar to:
Code: Select all
public class FastForwardManager : MonoBehaviour
{
public bool fastForward;
// Finish every subtitle after 0.5 seconds:
void OnConversationLine(Subtitle subtitle)
{
if (fastForward)
{
subtitle.sequence = "Continue()@0.5; " + subtitle.sequence;
}
}
}
The game Gestalt: Steam & Cinder, for example, lets you hold down a joystick button or key to speed up lines of dialogue. When you press the button, it sets the typewriter speed and subtitleCharsPerSecond to 200 characters per second, and adds Continue()@{{end}} to the sequence. When you release the button, it returns to the original speed and leaves the original sequence untouched.