Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Target Dead Enemies

I want to make a skill that targets dead enemies, just as you can target dead heroes for resurrection. I want a beast that can eat the dead to regain HP.

Does anyone know how to do this? I would really appreaciate it.
 
it's actually not that simple, as when an enemy dies, they are removed from battle. they don't just stay there as dead. so you can't get them to stay in battle as a dead enemy.
 
Ah, I see.

I'm doing a tactical battle system, where the enemies are still lying around after they're killed. I didn't realize it would be much different from the default system.
 
Actually, they are flagged in the system as 'hidden' so while they are dead and unable to be targetted... they are still on the map.

The code that determines when a battler exists is in Game_Battler:
Code:
  #--------------------------------------------------------------------------
  # * Decide Existance
  #--------------------------------------------------------------------------
  def exist?
    return (not @hidden and (@hp > 0 or @immortal))
  end
This is used for determining when a character is dead (along with the def dead? routine) and is used for enemy targetting purposes. Right now, can't have one without the other... for now.

Hope this helps.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top