Kain Nobel
Member
System : Quick Shutdown
Version: 3.5
By: Kain Nobel
Introduction
Quickly shutdown your entire fantasy world by simply pressing a button :P
Features
Script
Instructions
Place above 'main'
FAQ
Compatibility
Terms and Conditions
Bah, credit me or whatever :P
Version: 3.5
By: Kain Nobel
Introduction
Quickly shutdown your entire fantasy world by simply pressing a button :P
Features
- One-button shutdown (for lazy people, like me)
- Define what button you want to call shutdown (F8 by default)
- Define which scenes disable the One-Button shutdown feature
Script
Code:
#===============================================================================
# ** System : Quick Shutdown
#===============================================================================
Â
#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
if Object.const_defined?(:SDK)
 SDK.log('System.HotKeyShutdown', 'Kain Nobel ©', 3.5, '2009.06.17')
end
Â
#===============================================================================
# ** QuickShutdown
#===============================================================================
Â
module QuickShutdown
 #-----------------------------------------------------------------------------
 # * Button to trigger the game to close
 #-----------------------------------------------------------------------------
 Button = Keys::ESCAPE
 #-----------------------------------------------------------------------------
 # * Scenes which don't allow this hotkey to be utilized
 #-----------------------------------------------------------------------------
 Xclude = ['Scene_FullScreen', 'Scene_Splash']
end
Â
#===============================================================================
# ** Graphics
#===============================================================================
Â
class << Graphics
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :exithotkey_graphics_update, :update
 #-----------------------------------------------------------------------------
 # * Update
 #-----------------------------------------------------------------------------
 def update
  exithotkey_graphics_update
  if Input.trigger?(QuickShutdown::Button)
   unless QuickShutdown::Xclude.include?("#{$scene.class}") || $scene.nil?
    $game_system.se_play($data_system.actor_collapse_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = nil
   end
  end
 end
end
Instructions
Place above 'main'
FAQ
The "Button" by default is F8 (Input::F8) but you can set it to anything, for instance if you're using a AWorks Input/Keys you could set it to Keys::ESCAPE if you'd like
In order to exclude scenes from allowing the one-button shutdown, just place the scene's name (as a String) into the Xclude array.
Lets say you don't want the key to work at the title screen or in battle, then it would be set like...
Xclude = ['Scene_Title', 'Scene_Battle']
Lets say you don't want the key to work at the title screen or in battle, then it would be set like...
Xclude = ['Scene_Title', 'Scene_Battle']
Compatibility
Graphics.update
Terms and Conditions
Bah, credit me or whatever :P