• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Enemy Combo (Solved)

Hello GM Community!

Got a little question for you, concerning enemy states, attacks, and damage code not working correctly.

So, the enemies in my game enter attack animations, and when they reach a certain image_index, they create a damage object with a sprite in the shape of their attack. I recently tried to make my first enemy that attacks with a combo, just a single attack after the first. I did this by saying in the enemy chase state that when it gets in range it will choose either a single attack state or the first attack state in a combo. This works fine. The issue comes when I tell the enemy state to change to the second combo attack once it reaches a certain image_index.

I can tell that the state does in fact change, as the sprite_index changes and I can see the combo take place. The problem, however, is that the damage object for the second attack does not spawn for an unknown reason. The code is the exact same, except that I changed the sprite and image_index which causes it to spawn.

Any ideas as to why this doesn't work? Would it be because the damage object of the first attack hasn't been destroyed yet? Perhaps the enemy can only spawn one damage object at a time? But I kind of doubt this is the case.

EDIT:

Never mind, I have fixed the problem :) If anyone has a similar issue, I may be able to help them though!
 
Top