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.

[XP] Enemies fail to execute skills.

I'm having some issues with getting enemies to use skills. Yes, if I put skills into an enemy's list of "actions" (as it appears in the database) and the enemy has enough SP, the enemy can cast the skill. The issue is if the enemy doesn't have enough SP; if this occurs and the enemy doesn't have enough SP (or has drained too much of its SP during the battle), rather than trying to execute a different action off of the actions list it simply sits there and does nothing. It doesn't crash the game, but it completely ruins balancing in battles.

What I need to know is how to automatically remove actions from an enemy's actions list if the enemy isn't capable of performing them. From my understanding it would have to run each time the enemy has the opportunity to perform an action (to keep updated on how much SP the enemy has) and to only remove those actions for the remainder of the turn (in the case that special battle conditions cause the enemy to gain SP).

I'm running a sideview battle system, yes, but this issue also seems to occur with the default battle system so I doubt the sideview script is at fault. Besides that I apologize if this edit has already been made. I've tried pretty much every search I could think of for this and didn't find anything. :(
 

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