Hey guys
I just started trying to learn a little scripting in RMMV, and ive hit a bit of a wall. Im trying to make a simple end game screen like this
this almost works, it goes to title correctly if thats chosen but if i hit cancel this screen pops up
I have no idea where this came from. If you hit yes it goes to the title, and no takes you back to the first image and itll just loop if you keep hitting cancel.
Heres the code I have. I mostly tried to just copy it from the existing files but im not too sure what im doing yet and where it could have come from. If anyone could help id super apprecate it!
I just started trying to learn a little scripting in RMMV, and ive hit a bit of a wall. Im trying to make a simple end game screen like this
this almost works, it goes to title correctly if thats chosen but if i hit cancel this screen pops up
I have no idea where this came from. If you hit yes it goes to the title, and no takes you back to the first image and itll just loop if you keep hitting cancel.
function Scene_Exit() { this.initialize.apply(this, arguments);}Scene_Exit.prototype = Object.create(Scene_MenuBase.prototype);Scene_Exit.prototype.constructor = Scene_Exit;Scene_Exit.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this);};Scene_Exit.prototype.create = function() { Scene_MenuBase.prototype.create.call(this);this._exitWindow = new Window_Exit(259, 45, 282, 150); this.createCommandWindow();this.addWindow(this._exitWindow);};function Window_Exit () { this.initialize.apply(this, arguments);}Scene_Exit.prototype.createCommandWindow = function() { this._commandWindow = new Window_GameEnd(); this._commandWindow.setHandler('toTitle', this.commandToTitle.bind(this)); this._commandWindow.setHandler('cancel', this.popScene.bind(this)); this.addWindow(this._commandWindow);};Scene_Exit.prototype.commandToTitle = function() { this.fadeOutAll(); SceneManager.goto(Scene_Title);};//text windowWindow_Exit.prototype = Object.create(Window_Base.prototype);Window_Exit.prototype.constructor = Window_Exit;Window_Exit.prototype.initialize = function (x, y, width, height) {Window_Base.prototype.initialize.call(this, x, y, width, height);this.drawAllItems();}Window_Exit.prototype.drawAllItems = function (){let Exit = "Exit to Title Screen?" this.drawText(Exit, 35, 30, 200,);};Heres the code I have. I mostly tried to just copy it from the existing files but im not too sure what im doing yet and where it could have come from. If anyone could help id super apprecate it!
But I don't think people usually bother to quit the game via the menu, so if someone see the dialogue there is a higher chance they click it by mistake.