MV Continued Image Gauge Problems

So a few days ago, I was programming a HUD with image gauges in javascript (no plugins) to have more freedom and learn some java in the process. All was going well, making sure the masks worked, and they did! Until I encountered a problem, the guages weren't filling back up. I found the solution to that which was that it was continuously creating new masks instead of moving the existing ones. So I made sure they didn't do that. Problem solved right? Wrong, now the masks only update for one actor at a time.
1773889569389.png

I created a loop to make sure there is a mask for each gauge.
Spoiler: Code Excerpt 1
//Where the masks are created
Window_BattleStatus.prototype.createGaugeContents = function() {
this._gaugeContents = new Sprite();
var ww = this.contentsWidth();
var wy = this.contentsHeight();
this._gaugeContents.bitmap = new Bitmap(ww, wy);
this.addChildAt(this._gaugeContents, 3);
this._gaugeContents.move(this.standardPadding(), this.standardPadding());
for (var i = 0; i < $gameParty.battleMembers().length; ++i) {
var actor = $gameParty.battleMembers()[i];
this._hpGauge = new Sprite();
this._hpGauge._label = actor.name();
this._hpMask = new PIXI.Graphics().beginFill(0xFFFFFF).drawRect(0, 0, 95, 89);
this._hpGauge.mask = this._hpMask;
this._hpGauge.addChild(this._hpMask);
this._hpMask._label = actor.name();
this.addChildAt(this._hpGauge, 4);

this._mpGauge = new Sprite();
this._mpGauge._label = actor.name();
this._mpMask = new PIXI.Graphics().beginFill(0xFFFFFF).drawRect(0, 0, 184, 56);
this._mpGauge.mask = this._mpMask;
this._mpGauge.addChild(this._mpMask);
this._mpMask._label = actor.name();
this.addChildAt(this._mpGauge, 4);
};
};

But when I try to move the mask per actor, it seems to move all of them to the position of the actor being targeted?
Spoiler: Code Excerpt 2
//Where the mask is updated
Window_BattleStatus.prototype.drawItem = function(index) {
var actor = $gameParty.battleMembers()[index];
for (var i = 0; i < $gameParty.battleMembers().length; ++i) {
if (this._hpMask._label === actor.name()){
var drainH = (68 * actor.hpRate()) + 9;
this._hpMask.y = -drainH;
}
}
this.drawBasicArea(this.basicAreaRect(index), actor);
this.drawGaugeArea(this.gaugeAreaRect(index), actor);
this.drawStateArea(this.basicAreaRect(index), actor);
};

So I guess my question is, how do I make sure each mask updates independently from each other? Since I'm still pretty new at java I'm not sure how to do that myself.
The entire point of a sprite is that it updates itself. Take several steps back; look at how Window_BattleStatus creates gauges, and look at how Sprite_Gauge accepts information about a battler and updates itself based on that.

If you've already figured out the masking, then you've done the hard part in terms of what you are trying to do. You need to approach the problem differently and understand how gauge sprites are created, and how those sprites function.
Alrighty, I'll see what I can do

Original thread: https://forums.rpgmakerweb.com/threads/continued-image-gauge-problems.182936/