Jump to content
Guyver's Bane

No Death State For Actors

Recommended Posts

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 by Guyver's Bane

Share this post


Link to post
Share on other sites

'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

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

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.

  • Like 1

Share this post


Link to post
Share on other sites

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
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted