Smart Enemy AI | (Part 4: EQS) | Tutorial in Unreal Engine 5 (UE5)

preview_player
Показать описание
In this Unreal Engine Game development Tutorial you will learn the following:
- EQS: How to create Environment Queries to position your AI in a more advanced and smart way
- Run EQS: How to run the EQS in your behavior tree
- Strafing: How to make the enemy AI strafe around the player using the EQS
- Taking Cover: How to make the enemy AI find cover where the player can't see them

Link to my Patreon (Thank you for your support)

Link to part 1 of the "Smart Enemy AI" tutorial:

Link to the "Damage System" tutorial:

Link to the "Projectile System" tutorial:

Link to my "AOE Damage & Healing" tutorial:

About me:
I've been learning game development for over a year now, I do have a background in software engineering, but I've always wanted to create my own game.

I am currently working on this 3rd person action adventure game as a hobby, but I am also trying to build a community, thus I am creating YouTube tutorials to find others who are interested in game development and design.

If you are interested in learning more or if you are interested in working together, please let me know in the comments.

Join my Discord server to chat and mingle with the community

If you would like to support me on Patreon, you will get access to all the source code from every video I post as well as any custom assets that I create. Also I would be forever thankful to my early adopters

Checkout my other tutorials on my channel:

Chapters:
00:00 Outcome of this part
00:59 Recap of the last part
01:36 Animation Setup
04:49 Explanation of the EQS
06:06 Using Testing Pawn to Visualize the EQS
06:56 Continue Explanation of the EQS
09:39 Creating the Strafe EQS
14:46 Running the EQS in the Behavior Tree
17:16 First Test of the Strafe EQS
18:29 Fixing problems with the Strafe EQS
21:23 Testing the Fix
22:45 Combine Strafe with Attack
25:10 Ensuring the Enemy is Within Ideal Range From Player
42:28 Creating the FindCover EQS
48:44 FindCover Sequence in Behavior Tree
51:15 Next Up in Part 5

#unrealengine #unrealengine5 #ue5 #gamedev #smart #enemy #combat #AI #blueprint #tutorial #behavior #tree #perception #state
Рекомендации по теме
Комментарии
Автор

Awesome tutorial as always. One thing I got stuck on for awhile that is not mentioned but done very quickly is at 31:37 he sets ideal range and attack target variables to instance editable which allows you to change the blackboard key values in the behavior tree. Took me a while to figure out why I was unable to change those values so I figured I'd mention it in case anyone else has the same problem.

andrews
Автор

This is the most informative and thorough series on AI on youtube without question. It's well edited, you don't waste time, it's well-thought out and doesn't involve a bunch of rework in subsequent videos like some people end up doing. You cover best practices, you give tips when needed...you are just so helpful. Thank you for this. I plan to do all of this series and can't wait to see what you put out next.

mebessusn
Автор

Incredible tutorial quality. I'm truly amazed by the quality of the explanations.

Maybe I'm not good at finding good tutorials on AI in unreal engine, because so far I haven't had any conclusive lessons. But now I feel really lucky to have come across your Youtube channel.
(Sorry to repeat myself, I know I have a similar comment in the part #3 before, but I'm so bluffed by the quality that I feel the need to express it haha)

Thank you for taking the time to share your knowledge with us, in a pedagogical way and with a really excellent quality.

Shizuma
Автор

This, truly, is a fantastic series. You're explanation is so well thought out and easy to follow, especially for someone like me who is just getting started. Between blackboards, AnimBPs, AI states, EQS, there are so many ways to get lost and overwhelmed when trying to follow along with the logic. You are making this possible to understand. I'd be totally lost without this series. Thank you, many time over!

twelvegrain
Автор

Just wanna say thank you man, this EQS part was exactly what I was wanting to learn. Thank you for the good content.

KensynPortha
Автор

I don't know if I missed something in the video or if this is later adressed but I was constantly getting a runtime error: "Blueprint Runtime Error: "Accessed None trying to read property Node: Return Node Graph: PerformConditionCheckAI Function: Perform Condition Check AI Blueprint: BTD_IsWithinIdealRange" in the decorator function. I found out this was happening because the enemy at the beggining wasn't seeing me so the value of Attack Target would be null when the node was being called thus printing out the above error constantly. I fixed it by simply adding an Is Valid node to determine if the value of the Attack Target variable is a valid one or not and that pretty much fixed the issue.

Amazing series by the way! I've been learning a lot regarding AI in Unreal Engine and this has been especially helpful for me since I'm changing engines from Unity (you you probably know why 😅) .

gdkller
Автор

These are the greatest AI tutorials on youtube. Thank you.

Зритель-шу
Автор

It's a great tutorial to understanding EQS and Behavior Tree together. Hardly understand other EQS tutorial until i found this one.
Hope you can create more tutorial about Unreal Engine. Thanks for the content!

hendra_winata
Автор

Alright, so I ended up fixing the issue. In the video, you mentioned that the context offset should be zero because it doesn't do anything. However, when I ran the debugger with the Apostrophe key and Numpad 3 on the keyboard, I realized that with the context offset at zero, for some reason the engine was showing the AI that the best place to be is where he was standing already which was right before the player, so I added 200 to the context offset, and now the engine was showing the player that the best place to be is behind the wall so the AI now goes behind the wall when he sees the player. Issue resolved. Still, I wouldn't have learned any of this without your tutorials, so you are awesome. Thank you.

kellowattentertainment
Автор

New week, new part of the series. Thank you for all this qualitative content. Won't forget to donate you once I got my first pay. Cheers

BlenderYouko
Автор

I've been really enjoying the tutorials. The thing I like about them is that you explain everything very well, unlike some other tutorials that don't really explain what they're doing in their code. Keep up the good work!

scienceandtorah
Автор

for anyone who may run into this problem in the future. I found some issues that could occur with the find cover EQS. I had my enemy ai set to blocking visibility in its collision which was making the EQS grid consider it's current location as the single best location. Changed the visibility collision to overlap and it fixed the issue. Spent hours trying to figure this one out cause my enemy wasn't running away xD

CronicGaming
Автор

These are the greatest AI tutorials on youtube

ericwoot
Автор

I am a beginner.
You have led the lectures well with the learners in mind so that even beginners can easily follow lectures 1 to 3.
While listening to your lectures, I thought you made really good tutorial lectures.
However, I was a little disappointed that the animation settings part of this lecture was missing.
I understand that it is missing because it is an AI lecture. But I liked learning by following the directions you taught.
I watched a lot of completed projects and other paid lectures, but even if I received a completed project, it was often of no use because I didn't know how it was created.
I wanted to understand the learning process one by one and assemble it, but this lecture left something to be desired.

You can sponsor me and receive the completed project, but
I am so sorry that I have to move on from the project that I am very attached to and move on to the completed project, which I have been following through your lectures and taking notes to help me understand.

I think even beginners like me will learn a lot if you proceed without any omitted parts from next time.

I am writing this from the perspective of a beginner who is learning.

Thank you for creating a great lecture.

You've done a great job up to this point :)
Moving on to the next video :D
Thank you for the tutorial!

YS-twce
Автор

ı fixed it. if your character teleporting and bugging strafe blendspace on playing. probably your charaters anımations is not playing in place. if you download animations in mixamo tick "in place" box your character animations played has to be like runned on the treadmill. and have to be your 2 animations first one -> strafe x axis. secondly strafe y axis. and dublicate these and change playRate as -1in this way you will have four animations forward backward left and right. place these animations in correct points. its so eays.

DaviesMurphy
Автор

yet again great video! Something that people can do is add in a Tester Actor, which I added in a bool to allow easy testing, just toggle the instance editable. Then GetActorOfClass TesterActor, grab the bool value for Testing, then use that in a branch to either print and display the EQS markers, or to real AIC to player. Very simple but stops you having to reopen the file and reconfig it every time.

**EDIT**

This is for inside the EQS_Context_AttackTarget class :)

Moridagnir.G.P
Автор

Awesome tutorial. This is gotta be the best tutorial about behavior trees and AI stuff I had ever seen.

TrustMeNothing
Автор

Another one, damn feels good to get these long videos done, appreciate the great content!

HusmanGames
Автор

I'll recommed you to all my UE friends! Thank you and happy coming Christmas!))))

itsroachtime
Автор

I love how you explained this, awesome tutorial!

MrBontA-csue