RPG Maker Forums

I tried making a simple plugin to add "Exit to Desktop" command in the option, derived from ARP_TitleCommandExit.

(function() {

var _Window_Options_makeCommandList = Window_Options.prototype.makeCommandList;
Window_Options.prototype.makeCommandList = function() {
_Window_Options_makeCommandList.call(this);
this.addCommand("Exit to Desktop", 'exitGame');
};
Scene_Options_createOptionsWindow = Scene_Options.prototype.createOptionsWindow;
Scene_Options.prototype.createOptionsWindow = function() {
Scene_Options_createOptionsWindow.call(this);
this._OptionsWindow.setHandler('exitGame', this.commandExitGame.bind(this));
};
Window_Options.prototype.commandExitGame = function() {
SceneManager.exit();
};

})();
It doesn't work. When the plugin load, the "Exit to Desktop" command shows up in the Options but it does nothing, also there's an error: "cannot read property 'setHandler' of undefined". What am I missing?

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top