Increase Typewriter Speed

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Kairos
Posts: 5
Joined: Fri Nov 24, 2023 9:22 am

Increase Typewriter Speed

Post by Kairos »

I want to have a function that would make the typewriter speed faster when I hold my mouse button. I tried using the built in "StandardUIContinueButtonFastForward" but it autocompletes the whole dialogue and it does not fit with my game, here what I came up with my code so far:

I've seen this code somewhere in this forum, but I can't seem to make it work.
I'm setting the "SetTypewriterSpeed" using Event Triggers in Unity.
The problem with this is that it skips the whole dialogue even when it's not finished when I click instead of holding it.
Attachments
Increase Typewriter.png
Increase Typewriter.png (16.42 KiB) Viewed 3998 times
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Increase Typewriter Speed

Post by Tony Li »

Hi,

Please see the bottom part of How To: Adjust Typewriter Speed. It links to this post which has example code that speeds up the typewriter when clicking a button. You can adapt it to speed up the typewriter when holding down the mouse button and returning to the original speed when releasing the mouse button.
Kairos
Posts: 5
Joined: Fri Nov 24, 2023 9:22 am

Re: Increase Typewriter Speed

Post by Kairos »

I see it!

Thanks again Tony!
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Increase Typewriter Speed

Post by Tony Li »

Glad to help!
Post Reply