enemy misses the player it stops moving

I’m having an issue where if the enemy misses the player, it stops moving, I’m kind of tied up with the blueprint logic

@ClockworkOcean

Set the movement mode to walking after the completed pin of your for each loop node :blush:

Oops, better delete my reply. Or wait…

:disguised_face:

Yep that’s me! Nothing suspicious here.

1 Like

lol :joy: thank you so much I wouldn’t have figured it out without u :handshake:

1 Like

Appreciate the help but one last thing I see that the enemy wont attack again afterwards only if he misses, what could be causing that even though he overlaps ?

You should also reset your Do Once node at the start :wink:

you mean the one at the melee custom event? I reset it after the apply damage node was executed

Yeah but you should also do it after your loop is completed

1 Like

sorry for bringing up this topic again but I’m having a new issue even though code hasn’t been changed since you last helped me. The issue is that the enemy won’t continue to attack as long as the player is in the detect range, which is a sphere collision, the player has to be going in and out of the collision, which is what I don’t want, I can’t tell what’s wrong this time.

Hey @Twan_so-kl!

That’s because resetting a Do Once node doesn’t trigger it, just enables the execution flow again. You can either retrigger it with a looping timer at the beginning instead of using a delay after the loop at the end is completed, or you can use a Sequence node after the completed pin of your For Each Loop node, reset the Do Once node with one of it’s output exec pins, and plug the Delay node after the other (keep the out connections of your delay node)

Hope this helps! :innocent:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.