- Joined
- Feb 16, 2014
- Messages
- 80
- Reaction score
- 18
- First Language
- English
I am editing rpg_windows.js
Around line 2550 there is the Window Status drawBlock1
this is my code:
Window_Status.prototype.drawBlock1 = function(y) {
var lineHeight = this.lineHeight();
this.contents.fontSize = 30;
this.drawActorName(this._actor, 172, 48, 300);
this.contents.fontSize = 24;
this.drawActorLevel(this._actor, 172, 48 + lineHeight * 1);
this.drawActorClass(this._actor, 172, 48 + lineHeight * 2, 300);
if (this._actor.nickname()) {
} else {
var color1 = this.tpGaugeColor1();
var color2 = this.tpGaugeColor2();
this.drawGauge(172, 48 + lineHeight * 3, 150, this._actor.tpRate(), color1, color2);
this.drawActorNickname(this._actor, 172, 48 + lineHeight * 3, 300);
}
this.resetFontSettings();
};
I am having trouble checking if the Actor's Nickname is blank or not.
I have tried:
this._actor.nickname === ""
this.actor.nickname === ""
actor.nickname === ""
this._nickname === ""
this._actor.nickname()
I have even tried matching a string:
this._actor.nickname === "None" (I set the nickname to "None")
I am basically trying to hide the TP Gauge if the actor doesn't have a nickname.
Any help is appreciated, I tried java script help sites but no luck, I am assuming I am referencing the variable wrong.
Around line 2550 there is the Window Status drawBlock1
this is my code:
Window_Status.prototype.drawBlock1 = function(y) {
var lineHeight = this.lineHeight();
this.contents.fontSize = 30;
this.drawActorName(this._actor, 172, 48, 300);
this.contents.fontSize = 24;
this.drawActorLevel(this._actor, 172, 48 + lineHeight * 1);
this.drawActorClass(this._actor, 172, 48 + lineHeight * 2, 300);
if (this._actor.nickname()) {
} else {
var color1 = this.tpGaugeColor1();
var color2 = this.tpGaugeColor2();
this.drawGauge(172, 48 + lineHeight * 3, 150, this._actor.tpRate(), color1, color2);
this.drawActorNickname(this._actor, 172, 48 + lineHeight * 3, 300);
}
this.resetFontSettings();
};
I am having trouble checking if the Actor's Nickname is blank or not.
I have tried:
this._actor.nickname === ""
this.actor.nickname === ""
actor.nickname === ""
this._nickname === ""
this._actor.nickname()
I have even tried matching a string:
this._actor.nickname === "None" (I set the nickname to "None")
I am basically trying to hide the TP Gauge if the actor doesn't have a nickname.
Any help is appreciated, I tried java script help sites but no luck, I am assuming I am referencing the variable wrong.
Last edited by a moderator:
