Battle Log waits for Button Input

● ARCHIVED · READ-ONLY
Started by Argami 21 posts Page 1 of 2 View original ↗
  1. 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! :)
  2. *Little Bump*
  3. *Little Bump Again*
  4. *bump again*
  5. *Bumpity bump*
  6. *The adventure of the infinite bump...*
  7. *6th Bump* :(
  8. *Bump...*
  9. *B-u-m-p*
  10. 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
  11. TheoAllen said:
    May work
    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.
  12. 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
  13. TheoAllen said:
    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.
  14. 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
  15. 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.
  16. 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
  17. 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
  18. Yes... Even in the blank project you sometimes have to press the button two times :( Its wierd
  19. 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
  20. Where would I go about adding this code? Is it somewhere in rpg_windows or in rpg_scenes?