The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => Topic started by: Aznkid367 on July 26, 2012, 07:43:45 AM

Title: [VXA] Recover HP and Mana upon leveling up.
Post by: Aznkid367 on July 26, 2012, 07:43:45 AM
I just have a simple request, how do I make it so that the party members recover hp and mp when they level up?
Title: Re: [VXA] Recover HP and Mana upon leveling up.
Post by: pacdiggity on July 26, 2012, 09:53:51 AM
You could have a parallel process event running that checks if the actors' levels have changed, and if they are, recover their HP and MP.

Alternatively, you could use this snippet I just made up (anywhere in the Materials section of the script editor, preferably high up).
Code: [Select]
class Game_Actor < Game_Battler
  alias hpmprec_lvl_up level_up
  def level_up(*args)
    hpmprec_lvl_up(*args)
    @hp = mhp
    @mp = mmp
  end
end
Title: Re: [VXA] Recover HP and Mana upon leveling up.
Post by: Aznkid367 on July 26, 2012, 06:00:36 PM
Thanks, this works a lot better and is easier to use.