hey guys
im having an issue with a script im playing with for my game
i watched a video on how to make common events happen from menu
and i wanted to add switch control
the first half worked then i tried to add another item with a switch for a debug menu
and it broke the whole script
the issue seams to be in the commented out area
im having an issue with a script im playing with for my game
i watched a video on how to make common events happen from menu
and i wanted to add switch control
the first half worked then i tried to add another item with a switch for a debug menu
and it broke the whole script
the issue seams to be in the commented out area
Window_MenuCommand.prototype.addOriginalCommands = function() {
this.addCommand("Professions", 'professions', true);
};
var xscene_menu_ccw = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
xscene_menu_ccw.call(this);
this._commandWindow.setHandler('professions', this.commandProfessions.bind(this));
this.addWindow(this._commandWindow);
};
Scene_Menu.prototype.commandProfessions = function() {
$gameTemp.reserveCommonEvent($gameSystem._commonEventNumber);
SceneManager.push(Scene_Map);
}
var alias_gameSystem = Game_System.prototype.initialize;
Game_System.prototype.initialize = function() {
alias_gameSystem.call(this);
this._commonEventNumber = 2;
}
Game_Interpreter.prototype.pluginCommand = function(command, args) {
if (command === "commonEventProfession") {
$gameSystem._commonEventNumber = args[0];
}
};
// if ($gameSwitches.setValue(1, true)😉 {
// Window_MenuCommand.prototype.addOriginalCommands = function() {
// this.addCommand("Debug", 'debug', true);
// };
// var xscene_menu_ccw = Scene_Menu.prototype.createCommandWindow;
// Scene_Menu.prototype.createCommandWindow = function() {
// xscene_menu_ccw.call(this);
// this._commandWindow.setHandler('debug', this.commandProfessions.bind(this));
// this.addWindow(this._commandWindow);
// };
// Scene_Menu.prototype.commandDebug = function() {
// $gameTemp.reserveCommonEvent($gameSystem._commonEventNumber);
// SceneManager.push(Scene_Map);
// }
// var alias_gameSystem = Game_System.prototype.initialize;
// Game_System.prototype.initialize = function() {
// alias_gameSystem.call(this);
// this._commonEventNumber = 1;
// }
// Game_Interpreter.prototype.pluginCommand = function(command, args) {
// if (command === "commonEventDebug") {
// $gameSystem._commonEventNumber = args[0];
// }
// };
// };
this.addCommand("Professions", 'professions', true);
};
var xscene_menu_ccw = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
xscene_menu_ccw.call(this);
this._commandWindow.setHandler('professions', this.commandProfessions.bind(this));
this.addWindow(this._commandWindow);
};
Scene_Menu.prototype.commandProfessions = function() {
$gameTemp.reserveCommonEvent($gameSystem._commonEventNumber);
SceneManager.push(Scene_Map);
}
var alias_gameSystem = Game_System.prototype.initialize;
Game_System.prototype.initialize = function() {
alias_gameSystem.call(this);
this._commonEventNumber = 2;
}
Game_Interpreter.prototype.pluginCommand = function(command, args) {
if (command === "commonEventProfession") {
$gameSystem._commonEventNumber = args[0];
}
};
// if ($gameSwitches.setValue(1, true)😉 {
// Window_MenuCommand.prototype.addOriginalCommands = function() {
// this.addCommand("Debug", 'debug', true);
// };
// var xscene_menu_ccw = Scene_Menu.prototype.createCommandWindow;
// Scene_Menu.prototype.createCommandWindow = function() {
// xscene_menu_ccw.call(this);
// this._commandWindow.setHandler('debug', this.commandProfessions.bind(this));
// this.addWindow(this._commandWindow);
// };
// Scene_Menu.prototype.commandDebug = function() {
// $gameTemp.reserveCommonEvent($gameSystem._commonEventNumber);
// SceneManager.push(Scene_Map);
// }
// var alias_gameSystem = Game_System.prototype.initialize;
// Game_System.prototype.initialize = function() {
// alias_gameSystem.call(this);
// this._commonEventNumber = 1;
// }
// Game_Interpreter.prototype.pluginCommand = function(command, args) {
// if (command === "commonEventDebug") {
// $gameSystem._commonEventNumber = args[0];
// }
// };
// };