Smart Enemy AI | (Part 2: Patrolling & States) | Tutorial in Unreal Engine 5 (UE5)
Ali Elzoheiry · 7,353 words · 37 min read · EN-ORIG

Below is the complete, readable transcript of Smart Enemy AI | (Part 2: Patrolling & States) | 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 two of our enemy AI tutorial series. Uh in this part we're going to be creating a uh patrolling state uh like this enemy you see here that's following um a spline along uh yeah following along a spline as their patrol route. Uh, and we're also going to be uh uh switching between
attacking state and patrol state. Um, so this is what it looks like. The enemy starts out uh patrolling. And if I press one, the enemy will take out a sword and start attacking me. And then if I press one again, the enemy puts back the sword and goes back to patrolling. And as you
can see, we have animations for unshathing the sword and also sheathing the sword again. So, we're going to be covering how to create this uh animation, these animation montages, the patrol state, and most importantly, how to get our enemy AI to switch between states. So, let's get started. All right, so this is uh where we left
off last time. We have this uh enemy and this behavior tree. Um, I changed one small thing in the wield sword um uh task. Uh, now the enemy does this animation, this uh wielding sword animation before he attacks me. Uh, just because uh we initially had it where the enemy just spawns a sword out of
nowhere. Now, I'm not going to show you how to create the um uh this this animation, but we will be using a sheath sword or unwield sword uh task at the end of this tutorial. So, you'll see exactly how uh how I did it. And as always, I'm going to leave um all of the
assets uh any meshes and the source code uh for my patronons uh link down in the description. All right. So, now we want to create um an additional state. So, right now we only have this combat state. Um we're going to create a new patrolling state. Uh and basically the enemy will be
Transcribe another video
Paste any YouTube, Instagram or TikTok link to get a free transcript.