I need some help with something that troubles me which I dont really get why it is happing.
so let me tell you what DOES work.
Press Start is a plugin I made for my side project and works really nice.
as it has GameEnd and to title, the "SceneManager.goto(Scene_PressStart)" is working (but I rule it out)
as the game dont uses menu usages!
it also has a custom GameOver scene and also uses "SceneManger.goto(Scene_PressStart)" and that
works without an issue.
PressStart also instantly start the game without any problem.
What DOES NOT work, I repeat NOT WORK is the scriptcall SceneManager.goto(Scene_PressStart);
which is called from a common event when once the timer is out of time.
while the plugin isn't public, I post it here but it is NOT FOR USE IN ANY GAME! except my own game!
as it is made specially for it.
I just need to know why the scriptcall throws that error and run fine when gameOver, and what
modification I need to make in order to make it function correctly.
The code for GameEnd (ruled out) and Game Over is irrelivant, but the code not working
is something between those lines which I dont get.
I remove the code once it is solved, but DO NOT USE MY CODE IN YOUR GAME, use a better
version for press start if you want one, like Galv_CustomTitle, Eli_PressStart or TSR_Title!
so let me tell you what DOES work.
Press Start is a plugin I made for my side project and works really nice.
as it has GameEnd and to title, the "SceneManager.goto(Scene_PressStart)" is working (but I rule it out)
as the game dont uses menu usages!
it also has a custom GameOver scene and also uses "SceneManger.goto(Scene_PressStart)" and that
works without an issue.
PressStart also instantly start the game without any problem.
What DOES NOT work, I repeat NOT WORK is the scriptcall SceneManager.goto(Scene_PressStart);
which is called from a common event when once the timer is out of time.
while the plugin isn't public, I post it here but it is NOT FOR USE IN ANY GAME! except my own game!
as it is made specially for it.
I just need to know why the scriptcall throws that error and run fine when gameOver, and what
modification I need to make in order to make it function correctly.
JavaScript:
function Scene_PressStart() {
this.initialize.apply(this, arguments);
};
Scene_PressStart.prototype = Object.create(Scene_Base.prototype);
Scene_PressStart.prototype.constructor = Scene_PressStart;
Scene_PressStart.prototype.initialize = function() {
Scene_Base.prototype.initialize.call(this);
};
Scene_PressStart.prototype.create = function() {
Scene_Base.prototype.create.call(this);
this.createPrSt_Background();
};
Scene_PressStart.prototype.createPrSt_Background = function() {
this._PrStPic = new Sprite_Button();
this._PrStBGPic = new Sprite_Button();
this._PrStPic.bitmap = ImageManager.loadSystem("ShadowDragon_PrSt");
this._PrStBGPic.bitmap = ImageManager.loadSystem("ShadowDragon_BG");
this._PrStPic.x = ShadowDragon._PSposX;
this._PrStPic.y = ShadowDragon._PSposY;
this._PrStPic.setClickHandler(this.command_PrSt.bind(this));
this.addChildAt(this._PrStBGPic, 0);
this.addChildAt(this._PrStPic, 1);
};
Scene_PressStart.prototype.command_PrSt = function() {
SoundManager.playOk();
this.removeChild(this._PrStPic);
this.removeChild(this._PrStBGPic);
this.commandNewGame();
};
Scene_PressStart.prototype.update = function() {
Scene_Base.prototype.update.call(this);
this._PrStFrCount++;
this._PrStFrCount %= 40; // using Modulo to count the frames (fixed)
this._PrStPic.opacity = (20 - this._PrStFrCount) * 25;
if (Input.isTriggered('ok') || Input.isTriggered('cancel')){
SoundManager.playOk();
this.commandNewGame();
};
};
Scene_PressStart.prototype.commandNewGame = function() {
DataManager.setupNewGame();
//this._commandWindow.close();
//this.fadeOutAll(); // remove fade for instant transfer
SceneManager.goto(Scene_Map);
};
Scene_PressStart.prototype.start = function() {
Scene_Base.prototype.start.call(this);
this.startFadeIn(this.slowFadeSpeed(), false);
this._PrStFrCount = 25; // Fixed number, DO NOT CHANGE
};
The code for GameEnd (ruled out) and Game Over is irrelivant, but the code not working
is something between those lines which I dont get.
I remove the code once it is solved, but DO NOT USE MY CODE IN YOUR GAME, use a better
version for press start if you want one, like Galv_CustomTitle, Eli_PressStart or TSR_Title!
