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.

Script information request - a couple of questions

I'm trying to work out some things for a modified battle system idea, and I've got a couple of questions. I'm hoping someone here will be kind enough to answer them for me.

1) I know that when attacking (at least in Game_Battler 3 and the default attack action), there's a call of 'self.damage' that displays the damage taken. However, when calling the 'damage enemy' event, either from a common event or a battle event, damage dealt is not shown. I've tried modifying the segment of the Interpreter 7 script which contains the enemy damage action so it had a call of 'enemy.damage = value', but that had no apparent effect on displaying the numbers, and actually seems to have prevented the engine from recognizing the 'enemy dead, fade out now' flag, wherever that's located. How do I go about displaying the damage dealt by a 'damage enemy' event as though it were ordinary battle damage?

2) I know that Game_Battler 3 (and presumably the other Game_Battler scripts) use attacker and self to in the damage calculations to determine who's dealing damage and receiving damage, respectively. How would I go about determining which monster in the field or character in the team fell into each of those roles?
 
The thing that triggers the damage pop is, er... damage_pop. When a battler's damage_pop is set to true, it shows the value in the battler's damage variable. The 'deal damage' event command displays the damage fine for me, make sure you're using that and not 'change enemy HP', as that will just change their HP instead of doing damage.

All the actors and enemies in the battle are stored in $game_troop.enemies and $game_party.actors, so you can just plug them into the array's index function, e.g. $game_troop.enemies.index(self)
 

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