- Joined
- Dec 23, 2016
- Messages
- 195
- Reaction score
- 45
- First Language
- Portuguese
- Primarily Uses
- RMMV
Hello guys!
I found this plugin that @Trihan did for me, and I would like to change it to show the HP, MP, LV, and "to next level" gauges bars of the second member of the party. Yes, only the second member. (taking into account that the leader is the first member)
If I change the second member of the party, It would change the HP, MP and LV information to the other actor.
It´s possible?
Thanks in advance!!
I found this plugin that @Trihan did for me, and I would like to change it to show the HP, MP, LV, and "to next level" gauges bars of the second member of the party. Yes, only the second member. (taking into account that the leader is the first member)
If I change the second member of the party, It would change the HP, MP and LV information to the other actor.
It´s possible?
Thanks in advance!!
Code:
//=============================================================================
// MapHUD.js
//=============================================================================
/*:
* @plugindesc Simple HUD plugin for thalesgal.
* @author John Clifford (Trihan)
*
* @param X
* @desc The x coordinate of the window
* @default 0
*
*
* @param Y
* @desc The y coordinate of the window
* @default 0
*
* @help
*
* Just puts a HUD on the screen that shows the level/HP/MP of the party leader.
*
*/
(function() {
var parameters = PluginManager.parameters('MapHUD');
function Window_HUD() {
this.initialize.apply(this, arguments);
}
Window_HUD.prototype = Object.create(Window_Base.prototype);
Window_HUD.prototype.constructor = Window_HUD;
Window_HUD.prototype.initialize = function() {
Window_Base.prototype.initialize.call(this, parameters['X'], parameters['Y'], 350, 150);
this.opacity =0;
};
Window_HUD.prototype.update = function() {
this.contents.clear();
this.drawLeaderHUD();
};
Window_HUD.prototype.drawLeaderLevel = function(leader, x, y) {
var color1 = this.hpGaugeColor1();
var color2 = this.hpGaugeColor2();
this.drawGauge(10, 0, 150, (leader.currentExp() - leader.expForLevel(leader._level)) / (leader.nextLevelExp() - leader.expForLevel(leader._level)), color1, color2);
this.changeTextColor(this.systemColor());
this.drawText("Lv", 10, 0, 20);
this.resetTextColor();
this.drawText(leader.level, 40, 0, 10, 'right');
};
Window_HUD.prototype.drawLeaderHUD = function() {
var leader = $gameParty.members()[0];
this.drawLeaderLevel(leader, 50, 0);
this.opacity =0;
this.drawActorHp(leader, 10, this.lineHeight(), 150);
this.drawActorMp(leader, 10, this.lineHeight() * 2, 150);
};
_Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
_Scene_Map_createAllWindows.call(this);
this._hudWindow = new Window_HUD();
this.addChild(this._hudWindow);
};
})();



