[RMMV] Window Status Conditional

Jory4001

Veteran
Veteran
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.
 
Last edited by a moderator:

Jory4001

Veteran
Veteran
Joined
Feb 16, 2014
Messages
80
Reaction score
18
First Language
English
You Sir, have made my day!

Worked like a charm. Thank you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top