Guyver's Bane 38 Posted November 11, 2015 (edited) So Ive been looking into a new way of actors not being able to die in battle but at the same time not be able fight. What I've come up with is a Submission state that more or less prevents the actor from doing anything but use healing items. Only problem is the death state. I've looked into small script edits to make it so you're left with one HP, but they don't work. Any ideas on how to keep the actor HP at one instead of going to zero and dying? Edited November 11, 2015 by Guyver's Bane Share this post Link to post Share on other sites
Rikifive 3,411 Posted November 11, 2015 'Any ideas on how to keep the actor HP at one instead of going to zero and dying?' Without any more features, this will prevent from getting to zero HP. class Game_Battler < Game_BattlerBase alias :die_up :die def die die_up @hp = 1 # DEFAULT : 0 end end How it looks: When a character receives a fatal blow, then the HP is less than 0HP, so the state with ID:1 is applied then immediatelly the HP is turned to 1 and removes state with ID:1. Everything happens instantly. I believe you'll need more things to make it look properly, but I'd have to know more details. Share this post Link to post Share on other sites
Guyver's Bane 38 Posted November 12, 2015 With it being in GameBattler_Base will affect enemies as well? Share this post Link to post Share on other sites
Rikifive 3,411 Posted November 12, 2015 That's right! =D And I absolutely forgot about that! =D How could I not think about that! =D Well, sorry about that! =P Hmm... then I think it should be done in other place... But I have no idea. Battle scene is the worst one for me as I have no idea how to work with it. =P Share this post Link to post Share on other sites
+ TBWCS 953 Posted November 12, 2015 All you really have to do is detect which one dies. class Game_Battler < Game_BattlerBase def die @hp = 1 if self.is_a?(Game_Actor) @hp = 0 if self.is_a?(Game_Enemy) clear_states clear_buffs end end Your actor won't die but the enemy would. 1 Share this post Link to post Share on other sites
Rikifive 3,411 Posted November 12, 2015 I was trying to do something like this, but I couldn't find a proper way. Good to know how it should be done. ^^ Share this post Link to post Share on other sites
Guyver's Bane 38 Posted November 12, 2015 Awesome thank you both! I'll have to test it when get home so please keep the topic open until I can. Share this post Link to post Share on other sites