Battle Log waits for Button Input

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
Hello!
I'm wondering if it's possible to create a script that makes Battle Log to wait until a Button ins pressed (The Enter button, for example).
Sometimes the battle log runs too fast. I know it's possible to decrease it's speed but what I'm really looking for is the button input condition to keep going.

Thanks in advance! :)
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
*Little Bump*
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
*Little Bump Again*
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
*bump again*
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
*Bumpity bump*
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
*The adventure of the infinite bump...*
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,594
Reaction score
6,525
First Language
Indonesian
Primarily Uses
RMVXA
May works, may not works. I don't even use BattleLog nowadays anyway
Code:
class Scene_Battle
  alias log_window_wait_edit create_log_window
  def create_log_window
    log_window_wait_edit
    @log_window.method_wait = method(:wait_for_input)
  end
 
  def wait_for_input(dur)
    loop do
      update_for_wait
      break if show_fast?
    end
  end
end
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,661
Reaction score
563
First Language
English
Primarily Uses
RMVXA
It does mostly work.
What I see wrong is it rapidly plays through messages if there is more than one to show in the window while you have the button pressed for that half second.
And it paused once for me at the end of the battle log with no text showing. After pressing the button it carried back to the actor choice window. Must have been a precise release of the button to stop at that point.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,594
Reaction score
6,525
First Language
Indonesian
Primarily Uses
RMVXA
So, does it need input update to prevent multiple trigger?
Code:
class Scene_Battle
  alias log_window_wait_edit create_log_window
  def create_log_window
   log_window_wait_edit
   @log_window.method_wait = method(:wait_for_input)
  end

  def wait_for_input(dur)
   loop do
     update_for_wait
     if show_fast?
       Input.update
       break 
     end
   end
  end
end
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,661
Reaction score
563
First Language
English
Primarily Uses
RMVXA
multiple trigger
Didn't quite have a good effect.
I added a wait after the input.update
wait(5)
and it seems to be good. We will see when the OP tries it out.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,594
Reaction score
6,525
First Language
Indonesian
Primarily Uses
RMVXA
I looked at the method show_fast, it uses press instead of trigger.
How about a custom input instead of relying on the default method tho
Code:
class Scene_Battle
  alias log_window_wait_edit create_log_window
  def create_log_window
   log_window_wait_edit
   @log_window.method_wait = method(:wait_for_input)
  end

  def wait_for_input(dur)
   loop do
    update_for_wait
    if Input.trigger?(:C)
      Input.update
      break
    end
   end
  end
end
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,661
Reaction score
563
First Language
English
Primarily Uses
RMVXA
I tried that as well as I also saw the show_fast method function, but for whatever reason it needs to be pressed twice to continue.
But calling show_fast works, which is weird.
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
Hi guys @TheoAllen @Roninator2 ! Sorry for taking too long to respond I thought nobody would be replying this post.
Well, I tried all the versions of the script you postet and it seems to work partially. For some reason I have to press the input button twice in some of the lines... Others work fine so I don't know where's the error :/
I tried it in my project and in a blank project and it appears the same error
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,661
Reaction score
563
First Language
English
Primarily Uses
RMVXA
Did you try the variation I stated?
Code:
class Scene_Battle
  alias log_window_wait_edit create_log_window
  def create_log_window
    log_window_wait_edit
    @log_window.method_wait = method(:wait_for_input)
  end

  def wait_for_input(dur)
    loop do
      update_for_wait
      if show_fast?
        Input.update
        wait(5)
        break 
      end
    end
  end
end
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
Yes... Even in the blank project you sometimes have to press the button two times :( Its wierd
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,661
Reaction score
563
First Language
English
Primarily Uses
RMVXA
Ok Try this
Code:
class Scene_Battle
  alias log_window_wait_edit create_log_window
  def create_log_window
   log_window_wait_edit
   @log_window.method_wait = method(:wait_for_input)
  end

  def wait_for_input(dur)
   loop do
    update_for_wait
    if show_fast?
      Input.update
      if Input.trigger?(:C)
        abs_wait_short
      end
      break
    end
   end
  end
end
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,236
Members
137,608
Latest member
Arm9
Top