How can I prevent battles from being abandoned when timer hits 0:00?

● ARCHIVED · READ-ONLY
Started by celebrus 6 posts View original ↗
  1. Hi all!

    How can I control what happens when the timer reaches 0:00?

    Currently, when the timer reaches 0:00, if the player is in a battle, the battle is abandoned. What if I don't want to abandon the battle when the clock strikes 0:00?

    Thank you!!
  2. I haven't tested this out, but this should do it.



    Code:
    class Game_Timer; def on_expire; end; end
    Paste it anywhere on its own page in your script editor.
  3. Whoa. I forgot about this thread. Sorry and thanks for your help Mr. Bubble! It works great. One request comes to mind though. How could I enable/disable this script by switch? Turns out, sometimes I'd like to do it each of the two ways! Thanks!
  4. Code:
    class Game_Timer
      alias on_expire_bubs_switch on_expire
      def on_expire
    	switch_id = 123
    	on_expire_bubs_switch unless $game_switches[switch_id] # alias
      end
    end
    Switch OFF is the default way (abort battle at zero).

    Switch ON prevents abort at zero.
  5. Sweet. Thanks!
  6. 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.