I'm trying to write a script to make any character that falls in battle HP to equal 1 after the battle.. I really don't have a clue what I'm doing and have been trying to research this simple thing xD
class Game_Actor < Game_Battler <--- I don't know what this does but saw it in other scripts :)
if @hp = 0
HP_PLUS = true
end
if HP_PLUS = true
@hp = 1
end
end
that's what I have... Please help! :mex:
Try this:
class Scene_Battle
#--------------------------------------------------------------------------
# * End Battle
# result : Results (0: win, 1: escape, 2:lose)
#--------------------------------------------------------------------------
alias ghero_hp_recover_to1_on_bttl_end_8fbf battle_end
def battle_end(result)
ghero_hp_recover_to1_on_bttl_end_8fbf (result)
$game_party.members.each { |actor| actor.hp = 1 if actor.dead? }
end
end
Unless I messed up somewhere or misthought this, that ought to work.
Thank you!