RPG Maker Forums

Hey guys! I actually just need help formatting this script done by Lecode in this thread. I think it'll do what I want but I can't test it because in an apparent forum update several months back, all the old script posts got messed up. I tried formatting it myself based on scripts I've seen, and... it was embarrassing.

 


#- By Lecodeclass Scene_System < Scene_MenuBase alias lessshutconf_start start def start super lessshutconf_start create_shutdown_confirm_window end alias lessshutconf_create_command_window create_command_window def create_command_window lessshutconf_create_command_window @command_window.set_handler:)shutdown, method:)command_prepare_shutdown)) end def create_shutdown_confirm_window @shutconfirm_window = Window_ShutdownConfirm.new @shutconfirm_window.set_handler:)ok, method:)shutconfirm_ok)) @shutconfirm_window.set_handler:)cancel, method:)shutconfirm_cancel)) end def command_prepare_shutdown @shutconfirm_window.open @shutconfirm_window.activate @shutconfirm_window.select(1) end def shutconfirm_ok @shutconfirm_window.close command_shutdown end def shutconfirm_cancel @shutconfirm_window.close @command_window.activate end endclass Window_ShutdownConfirm < Window_Command def initialize super(get_x, get_y) self.openness = 0 end def get_x Graphics.width/2 - window_width/2 end def get_y Graphics.height/2 - window_height/2 end def window_width return 160 end def window_height fitting_height(2) end def make_command_list add_command("Yes", :ok) add_command("No", :cancel) end end
Like this




As described in the thread I got it from, I believe it will create a window popup which asks "Are you sure?" then a Yes/No selection after the player activates the shutdown command from the esc menu. Since my game is so simple, the esc menu's only two options are Items and Quit Game. Naturally I don't want the player to accidentally shutdown when trying to get to an item, and I'm hoping this will act as a safeguard against that. Ideally it'd just go to the title screen instead of totally shutting down, because I find that to be a weird feature anyway, but hey, I'll take what I can get.



I'm using Yanfly's Ace Message System and the mjishi Basic Non-Combat Menu.

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top