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.

Help understanding this, please.

This is all for RMXP by the way.

I made it so that sometimes battlers can have an hp higher than their maxhp. The thing is that I noticed enemies don't do anything when their hp is higher than their maxhp, while the player can still do so.

I'm not sure, but I think it is related to this:

(Scene_Battle 1, line 187-193)
Code:
# Confirm enemy conditions

if c.enemy_valid

  enemy = $game_troop.enemies[c.enemy_index]

  if enemy == nil or enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp

     next

  end

end

I don't know where this is used, or what it exactly checks, but apparently this possible-hp>maxhp feature ruins it. Does it have to do with the enemies not attacking now? I would like someone to give me an idea of what this does. Thanks.
 

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