How to make a simple AI enemy

Hi everybody! I am a complete beginner with Unreal Engine. I’m not sure if this is the right place to ask for help, but I need to reach out because I’m so stumped.

I am making a simple 2D platformer (it’s actually 3D but you can only move left and right). In this game, I need to make a very simple enemy AI that patrols its own little area, moves towards the player when they’re within range, inflicts damage if they run into the player, and dies if the player jumps on them. I have tried all I can think of (which I’m sure isn’t that much) but I cannot make an AI for the life of me.

I know this is such an open-ended question but I was just wondering if I could learn where to start, or maybe if there was a tutorial somewhere. I’m just really confused and I’d like to know how to make a basic enemy is all.

Yep! You can check out these tutorials from the same series:

#1, #2, #3, #4, #5

You can get the general idea from these and implement to fit your 2D scenario.

But since you mentioned the movement will only be in one axis, you can do this instead of the patroling tuto. As the others under the topic this linked post of mine is a part of also mentioned, you can as well execute that after Event Tick.

Hope these help :innocent:

Okay, I’ll mark this as the answer even though I still haven’t gotten it to work, but it helps though! Thanks!

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