I have made a simple variable like this:
var milenaSystem = Game_System.prototype.initialize;Game_System.prototype._numbervalue;Game_System.prototype.initialize = function() { milenaSystem.call(this); this._numbervalue = 3;}then made a new variable check at scene map:
Scene_Map.prototype.update = function() { this.updateDestination(); this.updateMainMultiply(); if (this.isSceneChangeOk()) { this.updateScene(); } else if (SceneManager.isNextScene(Scene_Battle)) { this.updateEncounterEffect(); } this.updateWaitCount(); Scene_Base.prototype.update.call(this); if ($gameSystem._numbervalue === 0) { SceneManager.goto(Scene_Gameover); }};When I decrease the variable _numbervalue until it reaches zero, it should go to Scene_Gameover but it just stays there and the game just stops, the sound is still playing, its just that the scene doesn't go to the scene I want. Anything went wrong?
var milenaSystem = Game_System.prototype.initialize;Game_System.prototype._numbervalue;Game_System.prototype.initialize = function() { milenaSystem.call(this); this._numbervalue = 3;}then made a new variable check at scene map:
Scene_Map.prototype.update = function() { this.updateDestination(); this.updateMainMultiply(); if (this.isSceneChangeOk()) { this.updateScene(); } else if (SceneManager.isNextScene(Scene_Battle)) { this.updateEncounterEffect(); } this.updateWaitCount(); Scene_Base.prototype.update.call(this); if ($gameSystem._numbervalue === 0) { SceneManager.goto(Scene_Gameover); }};When I decrease the variable _numbervalue until it reaches zero, it should go to Scene_Gameover but it just stays there and the game just stops, the sound is still playing, its just that the scene doesn't go to the scene I want. Anything went wrong?