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.

Enemy Dead Sprite

I was wondering if there's a script out there or someone who could make it that makes it so that instead of a enemy just dying, it shows a different sprite of the enemy in the battle that makes it look dead. I tried it with events, example;

Transforming the monster into a other enemy with an other sprite, but that isn't really the solution because there lots of 'bugs' then.

Also, if there is such a script or someone's willing to make it. I would like it to have it so that I can decide which enemy and which enemy doesn't has a 'Dead Sprite' and the ones who don't just die like normal.

I guess something like this would explain it the best way.

Code:
if enemy.hp = 0
 enemy.sprite = ("Graphics/Battlers/"enemy_name" + dead")
else
 (Normal dying here.)

I'm not a scripter, but I can do small things.
If that piece of code is totally wrong, my apologies if it confuses you.

Thank you for reading. Out.:thumb:
 
That's a start thank you:), but I would like for the sprite not to go away like in that script. The script of SephirothSpawn makes the 'dead' sprite fade away in red like the normal enemy would do when it's out of hp. I meant that the 'dead' sprite was supposed to stay there just doing nothing, but showing that the enemy was down.
 
Well, what you have to do is create a new image of the battler dead, and call it "Battlername_dead", for example if you're using Aluxes' default battler, you would have to make a new image called "001-Fighter01_dead", otherwise the dead battler will just disappear.

And... just a question, is this for the default turn-based battle, or a RTAB/ATB/CTB? Because it won't work for an ABS.
 
Try adding this below I the code from above:

Code:
class RPG::Sprite
  alias_method :seph_dontcollapsebattler_rpgsprite_collapse, :collapse
  def collapse
    if self.is_a?(Sprite_Battler) && @battler_visible && @battler != nil
      return
    end
    seph_dontcollapsebattler_rpgsprite_collapse
  end
end

class Sprite_Battler
  alias_method :seph_dontcollaspebattler_spritecharacter_update, :update
  def update
    collapses = @battler != nil && @battler_visible && @battler.damage == nil and @battler.dead?
    seph_dontcollaspebattler_spritecharacter_update
    if collapses
      @battler_visible = true
    end
  end
end
[/code]

Haven't tried it, so let me know if it doesn't work.
 

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