Hey, guys. I have been working on programming my first AI enemy using blueprints. I have made some really good progress, having made movement mechanics, basic attacking, player following, and some other stuff. There is one small problem, however, that I can’t seem to iron out.
The problem: The AI is set to attack when he is within 28 units of the player - either to the left or to the right . for the most part, this works. The AI, if not within 28 units, will walk over to the player. When the player quickly runs through the enemy, however, the AI will spawn the hitbox for his attack, but the animation will not play.
Gif of the problem: Screen capture - 6e5d1e57d0a684b901100c38c0bafd40 - Gyazo (the box is the attack hitbox)
Here is my blueprint for the attack: https://gyazo.com/62d2a8615417836a68e5229769c90a77https://gyazo.com/f3abeb91263c46a664eedcd58ae84d69
Here is where the attack is called: Screenshot - 4e324e8c0e9da5860e0dc010d6a57e6e - Gyazo This is all off of the event tick.
The question: How do I force the enemy to enter the animation before spawning the hitbox?
NOTE: If the player does not run through the enemy quickly, the enemy will attack as desired, doing the animation and all. It is only when running through the enemy that this happens.
If you need anything more, let me know.