So I have a script that changes MHP and HP based on a variable. I finally got it to where if the variable goes up or down the HP and MHP will both respond however the HP bar in the menu doesn't seem to update.
If the stats are raised ( 707/707 HP )
the bar shows partially empty
If the stats are lowered ( 408/408 HP )
the bar appears longer than usual
how do I set up a method to update these to the proper "full" setting under the above situations?
I'm working in Game_Actor by the way.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
er ... showing us the script might be helpful. Wrap it in code tags, and if it's a big script (more than a page long) put the whole thing into spoiler tags.
I don't think Game_Actor is the place to put it either.
I'll try that, sorry I thought it was 48 hours for some reason...
You have made the attr_reader method for hp(there is no need to alias it), but the hp rate is calculated with this method:
def hp_rate @hp.to_f / mhpendYou will need to change the @hp to take the value from the reader method:
def hp_rate hp.to_f / mhp endI just would think of maybe solving this with an alternative way.
And one tip, if you use so many elseif statements it would be better to switch to case.
Haha I was originally going to use case but was advised to use elsif's I'm new to scripting so i don't know what to do with some things, thanks for your reply. I'll check it out.
Edit: Worked perfectly thanks! This can be closed. Who thought a simple "@" would make all the difference...