Smart Enemy AI | (Part 6: Ranged Enemy Behavior) | Tutorial in Unreal Engine 5 (UE5)
Ali Elzoheiry · 6,609 words · 33 min read · EN-ORIG

Below is the complete, readable transcript of Smart Enemy AI | (Part 6: Ranged Enemy Behavior) | Tutorial in Unreal Engine 5 (UE5) by Ali Elzoheiry on YouTube. Read the full text, copy any part you need, or generate a transcript for any video with our free tool.
[Music] Welcome back everyone to part six, which is actually a continuation of part five because we didn't have time to finish the uh uh ranged enemy behavior. So, in this part, we're going to continue with uh the enemy movements, uh the ranged enemy attacks, uh taking damage and hiding to go heal, and after healing, uh
coming out and attacking us again. All right, so let's get started. So now let's actually start editing our ranged behavior tree. So open up our AI folder. Uh, and in behavior trees, let's open up BT enemy ranged. And let's start doing something with our combat state. So at this point, you should start
thinking how you want your enemy to behave. Uh, and this behavior is during combat. Now, the first thing that I want to do is as soon as the enemy sees me, I want them to start moving around to find a nice place to move and then attack or start evading my attacks. So, let's
create a sequence node here. Uh, I'm going to call this um I don't know, evade and attack. And the first thing we want to do here is set focus um focus target and we want to focus on the attack target. Uh we want to set our movement speed to something like jogging. Um and then we want to actually run some
EQS query and store it in the point of interest. Uh now I'm not going to choose from one of the EQS queries we created because we're going to want to create a new one here. Uh but just hold that thought for a second. After I run the EQS query and store the value in the point of
interest, let me actually instead of single best item, let's say get single item from best 25%. To get um some a random position from the best 25% and then call the move to and pass in the point of interest. Um after that let's do a wait for something like 0.3 seconds with a random deviation of 0.1.
Transcribe another video
Paste any YouTube, Instagram or TikTok link to get a free transcript.