I don't know, I can speculate but without seeing the full script and what the "drawItem" method is actually doing all I can say is the following:
I am assuming the drawItem method is taking "i" as a parameter to determine what stat to draw, if this is the case you could do:
Window_StatCompare.prototype.refresh = function() {
this.contents.clear();
if (!this._actor) return;
for (var i = 0; i < 7; ++i) {
if (i === 1) continue;
if (i === 0) {
this.drawItem(0, this.lineHeight() * i, i);
}
else {
this.drawItem(0, this.lineHeight() * i - 32, i);
}
}
};
Keep in mind this is just speculation, and without knowing what the drawItem function is actually doing, I can not give a concise answer.
I'm looking to add a bar to my status menu that are similar in appearance to the HP and MP bars, however I can't quite get it to work. I was wondering if anyone could help.
It's a bar that starts out low, but grows overtime as you gain exp. The end of the bar represents the number of max exp a character can potentially have.
So far I've been able to draw in the bars. Not much past that however.
Assuming you are using the "drawGauge" function of the Window_Base (and all windows that inherit this), it takes a "rate" parameter, this is the parameter that determines how much of the gauge is filled. You would want to pass a variable containing the current exp they have, divided by the maximum total experience they could potentially have. E.G: If their current exp is "1000" and the max total exp is "10000" you'd do "1000/10000" or 0.1, or 10% filled. You could use the "currentExp" function of the actor object (assuming one is being passed to the function drawing the gauge,other wise you need to get the actor object yourself) to get the current amount of exp they have, however no function exists to get the "max exp possible" directly. You'd need to call the "expForLevel" function of the actor object, and pass the max level to it as an argument.