- Joined
- Feb 9, 2018
- Messages
- 32
- Reaction score
- 3
- First Language
- English
- Primarily Uses
- RMMV
Howdy!
After some help with menus, I though I had a good understanding of them, however, this is clearly not the case so here I am.
My goal is just to make a window popup with text. Right now the error comes up when I try to create the window.
Here's my error and code:
Thanks for helping!
After some help with menus, I though I had a good understanding of them, however, this is clearly not the case so here I am.
My goal is just to make a window popup with text. Right now the error comes up when I try to create the window.
Here's my error and code:
Code:
TypeError: Cannot read property 'addChild' of undefined
Code:
//There is no need for this to be declared becasue the interpreterCommand from ResistanceIsFeudalGameStart.
//var interpreterCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
interpreterCommand.apply(this);
if (command === 'endScreen') {
Scene_Map.prototype.createEndWindow();
};
};
Scene_Map.prototype.createEndWindow = function() {
this._endWindow = new Window_End(0, 0);
this._endWindow.x = 10;
this._endWindow.y = 10;
//if (true) {
this._endWindow.drawText ("Ending 1 text", 0, 0, 0, 'left' );
//}
Scene_Base.prototype.addWindow(this._endWindow);
};
function Window_End() {
this.initialize.apply(this, arguments);
};
Window_End.prototype = Object.create(Window_Base.prototype);
Window_End.prototype.constructor = Window_End;
Window_End.prototype.initialize = function(x, y) {
var width = this.windowWidth();
var Height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, y, width, Height);
};
Window_End.prototype.windowWidth = function() {
return Graphics.boxWidth - 20;
};
Window_End.prototype.windowHeight = function() {
return Graphics.boxHeight - 20;
};

