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.

multiple attacks in the battle system code.

Dko

Member

I just want a little bit of advice. I once figured this out on my own. But its been a few years, I lost the code, and can't seam to remember how the hell I did it and the battle system code is full of bloody unintelligible comments as well as code.
I want to allow the players to make multiple attacks in a round (by pressing a few specific keys) based on the amount of a stat I already added successfully. All after the character has selected the target. Most of what I have tried has put the game into an infinite loop where nothing happens after I select the creature
The method make_basic_action_result() seams to be where I should focus my time. But still I mostly have the problem of freezing the battle system with my loop.

So whats your peoples ideas? :)

Thanks.
 

Dko

Member

Well I'm going to have it so after the user selects the enemy, the battle system goes into a state that looks for 3 commands each determining the attack strength. When a key is pressed an a certain amount of stamina is subtracted until it equals zero and the attack animation runs while damage is applied. Then the next free actor can go next and do the same.

I already have given game actors stamina and a variable that will hold the current command as a string three letters long that the method game_battler.attack_effect takes into account.
 

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