I had an issue a while back trying to add sfonts to MOG_BattleResult. I was partially successful; however, I'm just now noticing that every time I fight an enemy and get taken to the results screen for the battle, the sfont changes every time. Almost like it's cycling through all my sfonts, or choosing them at random.
I remember reading somewhere that I had to call bitmap.changesfont(index). Though I'm still not fairly adept at coding and I'm pretty sure I did something wrong. I kind of just added those bits of code after every "bitmap" I saw. Any help would be appreciated.
Line 423 - 438
Line 711 - 721
Line 734 - 763
JavaScript:
//==============================
// * Add ICon
//==============================
BattleResult.prototype.addIcon = function(sprite,data) {
var icon = new Sprite(this._icon_img);
var w = Window_Base._iconWidth;
var h = Window_Base._iconHeight;
var sx = data.iconIndex % 16 * w;
var sy = Math.floor(data.iconIndex / 16) * h;
icon.setFrame(sx,sy,w,h);
sprite.addChild(icon);
var name = new Sprite(new Bitmap(160,32));
name.bitmap.drawText(data.name,0,0,160,32);
name.x = w + 4;
sprite.addChild(name);
};
Line 711 - 721
JavaScript:
//==============================
// * Create Actor Name
//==============================
BattleResult.prototype.createActorName = function() {
this._name = new Sprite(new Bitmap(140,32));
this._name.opacity = 0;
this._name.bitmap.drawText(this._actor._name,0,0,140,32);
this._name.x = Moghunter.bresult_name_x;
this._name.y = Moghunter.bresult_name_y;
this.addChild(this._name);
};
Line 734 - 763
JavaScript:
//==============================
// * Create Parameters
//==============================
BattleResult.prototype.createParameters = function() {
var x = Moghunter.bresult_par1_x;
var y = Moghunter.bresult_par1_y;
this._par = new Sprite(new Bitmap(Graphics.boxWidth,Graphics.boxHeight));
this._par.opacity = 0;
this._par.bitmap.drawText(this._actopar[0],x,y,100,32);
this._par.bitmap.drawText(this._actopar[1],x,y + 32 * 1,100,32);
this._par.bitmap.drawText(this._actopar[2],x,y + 32 * 2,100,32);
this._par.bitmap.drawText(this._actopar[3],x,y + 32 * 3,100,32);
this._par.bitmap.drawText(this._actopar[4],x,y + 32 * 4,100,32);
this._par.bitmap.drawText(this._actopar[5],x,y + 32 * 5,100,32);
this._par.bitmap.drawText(this._actopar[6],x,y + 32 * 6,100,32);
this._par.bitmap.drawText(this._actopar[7],x,y + 32 * 7,100,32);
this._par.bitmap.drawText(this._actopar[8],x,y + 32 * 8,100,32);
var x = Moghunter.bresult_par2_x;
var y = Moghunter.bresult_par2_y;
this._par.bitmap.drawText(this._actor._level,x,y,100,32);
this._par.bitmap.drawText(this._actor.mhp,x,y + 32 * 1,100,32);
this._par.bitmap.drawText(this._actor.mmp,x,y + 32 * 2,100,32);
this._par.bitmap.drawText(this._actor.atk,x,y + 32 * 3,100,32);
this._par.bitmap.drawText(this._actor.def,x,y + 32 * 4,100,32);
this._par.bitmap.drawText(this._actor.mat,x,y + 32 * 5,100,32);
this._par.bitmap.drawText(this._actor.mdf,x,y + 32 * 6,100,32);
this._par.bitmap.drawText(this._actor.agi,x,y + 32 * 7,100,32);
this._par.bitmap.drawText(this._actor.luk,x,y + 32 * 8,100,32);
this.addChild(this._par);
};
Line 423 - 439
Added: name.bitmap.changeSFont(0) after line 434
Line 712 - 723
Added: this._name.bitmap.changeSFont(0) after line 716
Line 736 - 766
Added: this._par.bitmap.changeSFont(0) after line 742
Added: name.bitmap.changeSFont(0) after line 434
JavaScript:
//==============================
// * Add ICon
//==============================
BattleResult.prototype.addIcon = function(sprite,data) {
var icon = new Sprite(this._icon_img);
var w = Window_Base._iconWidth;
var h = Window_Base._iconHeight;
var sx = data.iconIndex % 16 * w;
var sy = Math.floor(data.iconIndex / 16) * h;
icon.setFrame(sx,sy,w,h);
sprite.addChild(icon);
var name = new Sprite(new Bitmap(240,32));
[B]name.bitmap.changeSFont(0)[/B]
name.bitmap.drawText(data.name,0,0,240,32);
name.x = w + 4;
sprite.addChild(name);
};
Line 712 - 723
Added: this._name.bitmap.changeSFont(0) after line 716
JavaScript:
//==============================
// * Create Actor Name
//==============================
BattleResult.prototype.createActorName = function() {
this._name = new Sprite(new Bitmap(140,32));
[B]this._name.bitmap.changeSFont(0)[/B]
this._name.opacity = 0;
this._name.bitmap.drawText(this._actor._name,0,0,300,32);
this._name.x = Moghunter.bresult_name_x;
this._name.y = Moghunter.bresult_name_y;
this.addChild(this._name);
};
Line 736 - 766
Added: this._par.bitmap.changeSFont(0) after line 742
JavaScript:
//==============================
// * Create Parameters
//==============================
BattleResult.prototype.createParameters = function() {
var x = Moghunter.bresult_par1_x;
var y = Moghunter.bresult_par1_y;
this._par = new Sprite(new Bitmap(Graphics.boxWidth,Graphics.boxHeight));
[B]this._par.bitmap.changeSFont(0)[/B]
this._par.opacity = 0;
this._par.bitmap.drawText(this._actopar[0],x,y,100,32);
this._par.bitmap.drawText(this._actopar[1],x,y + 32 * 1,100,32);
this._par.bitmap.drawText(this._actopar[2],x,y + 32 * 2,100,32);
this._par.bitmap.drawText(this._actopar[3],x,y + 32 * 3,100,32);
this._par.bitmap.drawText(this._actopar[4],x,y + 32 * 4,100,32);
this._par.bitmap.drawText(this._actopar[5],x,y + 32 * 5,100,32);
this._par.bitmap.drawText(this._actopar[6],x,y + 32 * 6,100,32);
this._par.bitmap.drawText(this._actopar[7],x,y + 32 * 7,100,32);
this._par.bitmap.drawText(this._actopar[8],x,y + 32 * 8,100,32);
var x = Moghunter.bresult_par2_x;
var y = Moghunter.bresult_par2_y;
this._par.bitmap.drawText(this._actor._level,x,y,100,32);
this._par.bitmap.drawText(this._actor.mhp,x,y + 32 * 1,100,32);
this._par.bitmap.drawText(this._actor.mmp,x,y + 32 * 2,100,32);
this._par.bitmap.drawText(this._actor.atk,x,y + 32 * 3,100,32);
this._par.bitmap.drawText(this._actor.def,x,y + 32 * 4,100,32);
this._par.bitmap.drawText(this._actor.mat,x,y + 32 * 5,100,32);
this._par.bitmap.drawText(this._actor.mdf,x,y + 32 * 6,100,32);
this._par.bitmap.drawText(this._actor.agi,x,y + 32 * 7,100,32);
this._par.bitmap.drawText(this._actor.luk,x,y + 32 * 8,100,32);
this.addChild(this._par);
};
I remember reading somewhere that I had to call bitmap.changesfont(index). Though I'm still not fairly adept at coding and I'm pretty sure I did something wrong. I kind of just added those bits of code after every "bitmap" I saw. Any help would be appreciated.