Let RPGMakerCode ignore typewriter default interval

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CHOPJZL
Posts: 97
Joined: Wed Sep 02, 2020 10:05 pm

Let RPGMakerCode ignore typewriter default interval

Post by CHOPJZL »

Hi,

The final interval between characters in Typewriter seems to be pauseduaration+1/charactersPerSecond. I tried to edit some code in IEnumerator Play(int fromIndex) but failed.

How to properly make RPGMakerCode ignore typewriter default interval?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Let RPGMakerCode ignore typewriter default interval

Post by Tony Li »

Hi,

You can remove that time from the Full Pause Duration and Quarter Pause Duration values.

For example, if Characters Per Second is 10 (so every character takes 0.1 seconds) and Full Pause Duration is initially set to 1.0 seconds, change Full Pause Duration to 0.9.
CHOPJZL
Posts: 97
Joined: Wed Sep 02, 2020 10:05 pm

Re: Let RPGMakerCode ignore typewriter default interval

Post by CHOPJZL »

What if the interval is longer than the pause duration? And the interval may change during gameplay.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Let RPGMakerCode ignore typewriter default interval

Post by Tony Li »

Let's say the Full Pause Duration is 1.0. Are you saying that you would set up the typewriter to type fewer than 1 character per second? I'm just trying to understand the situation.

Are you changing the Characters Per Second through code at runtime? If so, you can also change the Full Pause Duration correspondingly.
CHOPJZL
Posts: 97
Joined: Wed Sep 02, 2020 10:05 pm

Re: Let RPGMakerCode ignore typewriter default interval

Post by CHOPJZL »

Are you saying that you would set up the typewriter to type fewer than 1 character per second?
Actually for now I just come up with a situation that can't do by changing pause duration, but this could happen. Not just for full pause, quarter pause is more possibly to be in this situation.

And calculating pause duration everytime we change Characters Per Second is too unconvenient.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Let RPGMakerCode ignore typewriter default interval

Post by Tony Li »

If it comes up as an issue, let me know and we can address it then. Alternatively, you can make a subclass of the typewriter effect and override the Play() coroutine. Or override the StartTyping() method to automatically adjust the pause durations. It should only take one line of code, such as:

Code: Select all

fullPauseDuration = 1.0f - (1 / charactersPerSecond);
Post Reply