Script command to change text speed?

Status
Not open for further replies.

KingHazeel

Veteran
Veteran
Joined
Jul 5, 2018
Messages
125
Reaction score
5
First Language
English
Primarily Uses
RMVXA
I'm using a tiny script to slow the text speed down a bit so the player can better keep up with it.

class Window_Message
def wait_for_one_character
update_show_fast
wait(2)
Fiber.yield unless @show_fast || @line_show_fast
end
end

But if, at any point, I decide I want to remove this because I want the text to show up quickly or instantly, how would I issue a script command that would change "wait(2)" to "wait(0)" or longer if someone is supposed to be speaking slowly? Thanks!
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
If you just want to show up the text at once, there's a command for it. Go look up at the tooltip when you're hovering the text box.
 

KingHazeel

Veteran
Veteran
Joined
Jul 5, 2018
Messages
125
Reaction score
5
First Language
English
Primarily Uses
RMVXA
If you just want to show up the text at once, there's a command for it. Go look up at the tooltip when you're hovering the text box.
\>, right? It doesn't display everything at once when wait is above 0.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Looked at the default code, wait(2) doesn't even exist in that line.
Let me fix that for you.
Code:
class Window_Message
  def wait_for_one_character
    update_show_fast
    wait([$game_variables[999],1].max) unless @show_fast || @line_show_fast
  end
end
By using this, you will be using variable to control the text speed. And the \> command should work as intended.
But you have to specify the variable id by changing the number 999 into something else.
 

KingHazeel

Veteran
Veteran
Joined
Jul 5, 2018
Messages
125
Reaction score
5
First Language
English
Primarily Uses
RMVXA
That solved it, thanks!
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
@TheoAllen
Doing that will not update the @show_fast variable during the wait time.
That means that the player must wait that wait time before he can attempt to press the "fast forward text" button, and he will only have 1 frame to do so, or else the wait time triggers again. The players will most probably feel that the controls are unresponsive at this point.

Code:
  def wait_for_one_character
    $game_variables[999].times do
      update_show_fast
      break if @show_fast || @line_show_fast
      Fiber.yield
    end
  end
This should update the "fast forward text" button properly too.
I didn't put any minimum limit for the wait time, so if the specified variable is set to 0, the text will appear instantly, which is a feature I always use in any RPG I play if it's present in the options menu.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,456
Members
137,821
Latest member
Capterson
Top