- Joined
- Nov 1, 2016
- Messages
- 175
- Reaction score
- 64
- First Language
- Italiano
- Primarily Uses
Hi, everyone! I'm having trouble with my plugin. in theory, should replace the title commands, with image, name: Menu01, Menu02, Menu03, placed in the System folder. However, I do not know why, the plugin does not give problems to the game, but does not apply changes. Please help me! My program, says, that the error is at the 15 line, the Scene_Title.
Code:
/*:
*
* @This is my first plugin!
*
* @author Vito The Boss
*
* @help
*
* Hi everyone!
* This is the help file
* This is a plugin, that provides you
* to set up a image as title commands!
*/
var commandsImages = ['Menu01', 'Menu02', 'Menu03'];
Scene_Title.prototype.createCommandWindow = function() {
this._commandWindow = new Window_TitleCommand();
this._commandWindow.visible = false;
this._commandWindow.x = Graphics.width = 2;
this._commandWindow.y = Graphics.height = 2;
this._commandWindow.setHandler('newGame', this.commandNewGame.bind(this));
this._commandWindow.setHandler('continue', this.commandContinue.bind(this));
this._commandWindow.setHandler('options', this.commandOptions.bind(this));
this.addWindow(this._commandWindow);
};
var title_create = Scene_Title.prototype.create;
Scene_Title.prototype.create = function() {
title_create.apply(this);
this.createImageCommands();
};
Scene_Title.prototype.createImageCommands = function (){
this._imageCommands = new Sprite();
this._imageCommands.x = Graphics.width / 2 - 100;
this._imageCommands.y = Graphics.height / 2 - 100;
this.addChild(this._imageCommands);
};
var title_update = Scene_Title.prototype.update;
Scene_Title.prototype.update = function() {
title_create_update.apply(this);
this._imageCommands.bitmap = ImageManager.loadSystem(commandsImages[this._commandWindow._index]);
};
Last edited by a moderator:
