Hello everyone! This is my first post here and I am starting to learn Javascript and want to learn using RPG Maker MV for many personal projects.
I have been tinkering for practice in the Maker and got a lot of interesting results, but my next step is to draw faces on a Window. I wanted to use Window_Base.prototype.drawFace but have not got any luck so far. The code runs but no face shows up. My code is below:
(function(){
function Window_MyWindow2() {
this.initialize.apply(this, arguments);
}
Window_MyWindow2.prototype = Object.create(Window_Selectable.prototype);
Window_MyWindow2.prototype.constructor = Window_MyWindow2;
Window_MyWindow2.prototype.initialize = function(x,y,height,width) {
Window_Selectable.prototype.initialize.call(this,x,y,height,width);
this.refrescar();
};
Window_MyWindow2.prototype.refrescar = function() {
this.drawTextEx('\\C[20]x= ' + this.canvasToLocalX(500) + '\n\\C[0]y= ' +
this.canvasToLocalY(150), 0,50 );
this.drawFace('PER4',0,0,0,100,100);
}
var _Scene_Map_createAllWindows2 = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
_Scene_Map_createAllWindows2.call(this);
this.createMinimapWindow2();
};
Scene_Map.prototype.createMinimapWindow2 = function() {
this._minimapWindow2 = new Window_MyWindow2(200,30,600,570);
this.addChild(this._minimapWindow2);
};
// }
})();
This has many things that are just for practice purpose, but my goal is to draw a character face on the window. The file name is located where it should be and it is called PER4, but so far no luck.
Thanks. Any help is appreciated.