How do I force an enemy to follow through with an attack?

Get help using Construct 2

Post » Tue Nov 08, 2016 3:55 pm

EDIT: Never mind, I realized just now that I had the enemy's attack animation set to repeat, so line 55 never triggered even though it appeared like it did thanks to line 56! Whoops! :D

Hi, in my game I would like for enemies to follow through with their attacks, instead of aborting them when the player gets out of range. The problem I'm having has a lot to do with how I have my enemy's code and state changing set up, I think. Here is the code for my example enemy:

Image

As is, line 56 makes it so that when the player gets out of range, the enemy goes back to the 'active' state and stops attacking. I'd like to remove this line and replace whatever I need to in order to make it so that if the enemy is attacking, they don't change states until the current attack is done. But I can't figure out for the life of me how to change my code to make that happen!
B
18
S
9
Posts: 103
Reputation: 1,817

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests