I was wondering if there was a way to make your player have 1hp after battle if he/she dies. Either something like If hp = 0 then +1. I would even settle for just adding 1 hp point after every battle regardless of their current hp. But I'm not sure how I would do this.
How to make player not dead after battle.
RPG Maker VXAce SupportYes, you would need to do it in script.
Add this to a new script slot. I haven't tested it, so if you get an error come back and say what it says.
Add this to a new script slot. I haven't tested it, so if you get an error come back and say what it says.
Code:
Game_Actor < Game_Battler
def on_battle_end
self.change_hp(1) if self.hp == 0
super
end
end
If you want it so that all KO'd players are revived, but you can still lose a battle if everyone is KO'd, just go to state 1 and check remove on battle completion. That has worked for me, and now every KO'd party member has 1 HP after the fight is over.
It worked! Thanks a ton.
Just note that this solution still makes them gain 0 EXP if they die in battle. If you wish to change that too, remove the feature from state 1 which grants it (EXP * 0% I think?)
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-player-not-dead-after-battle.87121/