- Joined
- Jun 24, 2018
- Messages
- 18
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMMV
Hey! I'm new to this forum, I was making my own js plugin for making a custom title screen. Everything was going fine but I don't know where but I got this message:- Reference error: x is not defined 
Steps to reproduce the problem:
1. Create a blank project.
2. Create some splash screen with RPG maker splash screen plugin // I don't think it's necessary 0_0
3. Install my plugin.
AuraCustomT.js:
/*:
*
* @plugindesc This plugin is used to create custom title screen.
*
* @author Syed Shaazib Tanvir
*
* @Help Personal use plugin only. No help commands needed.
*/
(function () {
var sceneTitle_create = Scene_Title.prototype.create;
//predefined function
Scene_Title.prototype.create = function() {
sceneTitle_create.call(this);
this.createTitleFogs();
this.createTitleBtn();
};
//custom functions
Scene_Title.prototype.createTitleFogs = function(){x
this.titleFog1 = new TilingSprite();
this.titleFog1.move(0, 5, Graphics.width, Graphics.height);
this.titleFog1.bitmap = ImageManager.loadTitle2('Fog1');
this.addChild(this.titleFog1);
this.titleText = new TilingSprite();
this.titleText.move(-700, -400, Graphics.width, Graphics.height);
this.titleText.bitmap = ImageManager.loadTitle2('Title');
this.addChild(this.titleText);
}
Scene_Title.prototype.createTitleBtn = function(){
this.newGameBtn = new Sprite_Button();
this.newGameBtn.x = 1300;
this.newGameBtn.y = 540;
this.addChild(this.newGameBtn);
this.continueBtn = new Sprite_Button();
this.continueBtn.x = 0;
this.continueBtn.y = 640;
this.addChild(this.continueBtn);
this.optionsBtn = new Sprite_Button();
this.optionsBtn.x = 0;
this.optionsBtn.y = 740;
this.addChild(this.optionsBtn);
this.exitBtn = new Sprite_Button();
this.exitBtn.x = 0;
this.exitBtn.y = 840;
this.addChild(this.exitBtn);
}
Scene_Title.prototype.setActiveBtn = function() {
if(this._commandWindow._index === 0){
this.newGameBtn.bitmap = ImageManager.loadTitle2('newGame_1');
}
}
//predefined functions
Scene_Title.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SceneManager.clearStack();
this.centerSprite(this._backSprite1);
//this.centerSprite(this._backSprite2);
this.playTitleMusic();
this.startFadeIn(this.fadeSpeed(), false);
};
Scene_Title.prototype.createBackground = function() {
this._backSprite1 = new Sprite(ImageManager.loadTitle1($dataSystem.title1Name));
this._backSprite2 = new Sprite(ImageManager.loadTitle2($dataSystem.title2Name));
this.addChild(this._backSprite1);
this.addChild(this._backSprite2);
};
Scene_Title.prototype.createCommandWindow = function() {
this._commandWindow = new Window_TitleCommand();
this._commandWindow.x = Graphics.boxWidth;
this._commandWindow.y = Graphics.boxHeight;
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 sceneTitle_update = Scene_Title.prototype.update;
Scene_Title.prototype.update = function() {
sceneTitle_update.call(this);
//this.scrollFogs();
this.setActiveBtn();
};
/*Scene_Title.prototype.scrollFogs = function(){
this.titleFog1.origin.x += 1;
}*/
}) ();
Please help me guys!
THANKIES IN ADVANCE, LOL I SPELLED IT LIKE THAT INTENTIONALLY
Steps to reproduce the problem:
1. Create a blank project.
2. Create some splash screen with RPG maker splash screen plugin // I don't think it's necessary 0_0
3. Install my plugin.
AuraCustomT.js:
/*:
*
* @plugindesc This plugin is used to create custom title screen.
*
* @author Syed Shaazib Tanvir
*
* @Help Personal use plugin only. No help commands needed.
*/
(function () {
var sceneTitle_create = Scene_Title.prototype.create;
//predefined function
Scene_Title.prototype.create = function() {
sceneTitle_create.call(this);
this.createTitleFogs();
this.createTitleBtn();
};
//custom functions
Scene_Title.prototype.createTitleFogs = function(){x
this.titleFog1 = new TilingSprite();
this.titleFog1.move(0, 5, Graphics.width, Graphics.height);
this.titleFog1.bitmap = ImageManager.loadTitle2('Fog1');
this.addChild(this.titleFog1);
this.titleText = new TilingSprite();
this.titleText.move(-700, -400, Graphics.width, Graphics.height);
this.titleText.bitmap = ImageManager.loadTitle2('Title');
this.addChild(this.titleText);
}
Scene_Title.prototype.createTitleBtn = function(){
this.newGameBtn = new Sprite_Button();
this.newGameBtn.x = 1300;
this.newGameBtn.y = 540;
this.addChild(this.newGameBtn);
this.continueBtn = new Sprite_Button();
this.continueBtn.x = 0;
this.continueBtn.y = 640;
this.addChild(this.continueBtn);
this.optionsBtn = new Sprite_Button();
this.optionsBtn.x = 0;
this.optionsBtn.y = 740;
this.addChild(this.optionsBtn);
this.exitBtn = new Sprite_Button();
this.exitBtn.x = 0;
this.exitBtn.y = 840;
this.addChild(this.exitBtn);
}
Scene_Title.prototype.setActiveBtn = function() {
if(this._commandWindow._index === 0){
this.newGameBtn.bitmap = ImageManager.loadTitle2('newGame_1');
}
}
//predefined functions
Scene_Title.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SceneManager.clearStack();
this.centerSprite(this._backSprite1);
//this.centerSprite(this._backSprite2);
this.playTitleMusic();
this.startFadeIn(this.fadeSpeed(), false);
};
Scene_Title.prototype.createBackground = function() {
this._backSprite1 = new Sprite(ImageManager.loadTitle1($dataSystem.title1Name));
this._backSprite2 = new Sprite(ImageManager.loadTitle2($dataSystem.title2Name));
this.addChild(this._backSprite1);
this.addChild(this._backSprite2);
};
Scene_Title.prototype.createCommandWindow = function() {
this._commandWindow = new Window_TitleCommand();
this._commandWindow.x = Graphics.boxWidth;
this._commandWindow.y = Graphics.boxHeight;
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 sceneTitle_update = Scene_Title.prototype.update;
Scene_Title.prototype.update = function() {
sceneTitle_update.call(this);
//this.scrollFogs();
this.setActiveBtn();
};
/*Scene_Title.prototype.scrollFogs = function(){
this.titleFog1.origin.x += 1;
}*/
}) ();
Please help me guys!
THANKIES IN ADVANCE, LOL I SPELLED IT LIKE THAT INTENTIONALLY
Attachments
-
3.1 KB Views: 2
-
36.6 KB Views: 4


