How do you display different resources (eg,: hp, mp, tp) for different characters on the combat scre

LordCullwch

Villager
Member
Joined
Oct 28, 2015
Messages
5
Reaction score
1
First Language
English
I have run into another problem. In my previous thread Shaz kindly helped me implement an alternative resource (Gorge, bloodPool - call it what you will. It's a resource which fills with draining health from enemies). Now that I have done that, my problem is displaying it correctly on the battle screen. I have managed to replace the TP resource with this new 'Gorge' mechanic on the battle screen, but it replaced TP for all characters. My desire is to replace the TP resource bar with Gorge for only 1 of the characters. I would be grateful for any help. The code is as follows:

var _Draw_Gorge = Window_Base.prototype.drawActorGorge = function(actor, x, y, width) { width = width || 186; var color1 = this.crisisColor(); var color2 = this.hpGaugeColor2(); this.drawGauge(x, y, width, actor.gorgeRate(), color1, color2); this.changeTextColor(this.systemColor()); this.drawText(TextManager.hpA, x, y, 44); this.drawCurrentAndMax(Math.ceil(gorge), actor.mhp, x, y, width, this.hpColor(actor), this.normalColor());}; var _Battle_Gorge = Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) { this.drawActorHp(actor, rect.x + 0, rect.y, 108); this.drawActorMp(actor, rect.x + 123, rect.y, 96); this.drawActorGorge(actor, rect.x + 234, rect.y, 96);}; var _Gorge_Rate = Game_BattlerBase.prototype.gorgeRate = function() { return gorge / this.mhp;}; var _Gooorge = gorge = 0;I have also included an image which demonstrates the current state of things. I realise that the Gorge bar still has HP written over it, but that's something I'm confident I can sort out without help further down the line.



gorge.png
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
268
First Language
English
Put an if statement in there, 
if this actor has gorge 

then draw the gorge bar

else

draw the tp bar
 

LordCullwch

Villager
Member
Joined
Oct 28, 2015
Messages
5
Reaction score
1
First Language
English
Thank you very much! I've now sorted it thanks to your help. This is how I implemented your advice:

Code:
var _Battle_Gorge = Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {    this.drawActorHp(actor, rect.x + 0, rect.y, 108);    this.drawActorMp(actor, rect.x + 123, rect.y, 96);    if (actor === $gameActors.actor(1)) {        this.drawActorGorge(actor, rect.x + 234, rect.y, 96);    }};
 

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top