25 April 2014

Just For Fun: Shut Down The Game With A Keypress

This just-for-fun (and seemingly pointless) scriptlet enables you to shut down the game by pressing a key. This is what happens when boredom kicks in. It might come in handy for a very quick shutdown, rather than going through the Status Menu and exiting that way. (This was created in RMVX, but it'll probably also work in RMVXA.)

Title Screen

So, from the Title Screen, add this bit of code:
#============================================================
# ** Scene_Title
#============================================================
class Scene_Title < Scene_Base
  #----------------------------------------------------------
  # * Frame Update
  #----------------------------------------------------------
  alias cwkpsds_scnttl_update update
  def update
    cwkpsds_scnttl_update
    if Input.trigger?(Input::Z); exit; end
  end
end

Map

Alternatively, it can be used on the map.
#============================================================
# ** Scene_Map
#============================================================
class Scene_Map < Scene_Base
  #----------------------------------------------------------
  # * Frame Update
  #----------------------------------------------------------
  alias cwkpsds_scnmap_update update
  def update
    cwkpsds_scnmap_update
    if Input.trigger?(Input::Z); exit; end
  end
end

Available Keys

You can use other keys too: Z, SHIFT, CTRL, ALT, F5, F6, F7 and F8.

Note

Using this scriptlet means that you WILL lose your progress after any save point. Where this script might be most useful is if you're at work and playing, and the boss is nearby, you'll be able to quickly shut down the game with just one button. That is, if you don't mind replaying from the last save point.

The full, updated scriptlet can be downloaded here.
Related Posts with Thumbnails
Template Design "Perfect World" by SkinCorner