Page 1 of 1
Let RPGMakerCode ignore typewriter default interval
Posted: Wed Mar 03, 2021 5:58 am
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?
Re: Let RPGMakerCode ignore typewriter default interval
Posted: Wed Mar 03, 2021 8:53 am
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.
Re: Let RPGMakerCode ignore typewriter default interval
Posted: Wed Mar 03, 2021 9:08 am
by CHOPJZL
What if the interval is longer than the pause duration? And the interval may change during gameplay.
Re: Let RPGMakerCode ignore typewriter default interval
Posted: Wed Mar 03, 2021 9:29 am
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.
Re: Let RPGMakerCode ignore typewriter default interval
Posted: Wed Mar 03, 2021 9:38 am
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.
Re: Let RPGMakerCode ignore typewriter default interval
Posted: Wed Mar 03, 2021 10:39 am
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);