Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

[RPGMaker MV] Gauges Animated Problem in MenuStatus

Black Pearl

Villager
Xy$
0.00
Hello again, I have a small problem and seem can't figure it out how to fix it.
Basically in Window_MenuStatus in my menu plugin I removed the base draw gauge code and made my own gauges as .png. The gauges are working fine, dropping and increasing based on hp/mp/exp, except for the animation part. The animation is a continuous movement with .origin.x from left to right for all the gauge. But only the last character in party benefith of it. I placed the origin.x += 1 inside a Window_MenuStatus.prototype.update. I seen the gauge code (not the animation) apply for all the party members then stop. And probably the gauge .origin.x code run only for the last character in party. But I'm not sure how to fix that. Here is the code I made:

JavaScript:
Window_MenuStatus.prototype.drawHpGauge = function(index) {   
        var actor = $gameParty.members()[index];
        this._HP_GAUGE = new TilingSprite(ImageManager.loadMenu(st_gauge_hp));
        var rect = this.itemRect(index);
        var x = rect.x;
        var y = 282;
        var width = Math.ceil((actor.hp * 176) / actor.mhp);
        this._HP_GAUGE.move(x + 42, y, width, 14);
        this.addChild(this._HP_GAUGE);
};

// and the udpate

Window_MenuStatus.prototype.update = function() {
    this._HP_GAUGE.origin.x += 1;
    this._MP_GAUGE.origin.x += 1;
    this._EXP_GAUGE.origin.x += 1;
};
And here the menu screenshot if need:
https://imgur.com/a/4XxuKkh

Thanks!
 
Top