Download

Enemy Strafing? How?

Hi Guys…

I have a 2.5D sidescroller game… I have extremely simple enemy AI. They walk randomly around, when they see the player, they “move to” the player, and when they are within radius, they will attack… It’s as simple as that…

Question is, how do I make the enemies go back and forth, while looking at the player, just random back and forth, and when they get in range, and attack as they do now… Of course, I want them to move back and forth close to the player, or within a range. and I want the enemies to keep looking at the player, when moving away from the player…

Does this make sense? I’m still a noob at blueprints, so a simple solution suits me best… I don’t use behavior trees, they are too complicated to me, so I need it to be done in blueprints…

Any help would be VERY much appreciated!! :slight_smile:

Here’s a link to some gameplay if you want to have a look… Thanks!
https://youtu.be/DG_kounnzmU

-REE ANIMATION

GetControlledPawn().SetRotation( Point where you want to look at ) there you go

Haha… That simple? and then just “move to” random point within range?

well you have to set it on the tick function.

Hi, I got it. You must set the inversal vector from FrontVector Character’s movement once. Then with Event Tick, you set ACTOR rotation and add movement with the vector you set before.