Тёмный

Smart Enemy AI | (Part 2: Patrolling & States) | Tutorial in Unreal Engine 5 (UE5) 

Ali Elzoheiry
Подписаться 28 тыс.
Просмотров 68 тыс.
50% 1

In this Unreal Engine Game development Tutorial you will learn the following:
- Patrolling: How to make an enemy AI patrol along a spline
- States: How to switch between different states in behavior trees
- Priority: How priority works in behaviour trees and how to abort low priority tasks for higher priority ones
- Animation Montages: How to setup montages and montage notifies to trigger certain actions
Link to my Patreon (Thank you for your support)
/ alizoh
Link to part 1 of the "Smart Enemy AI" tutorial:
• Smart Enemy AI | (Part...
Link to the "Damage System" tutorial:
• How to Build a Combat ...
Link to the "Projectile System" tutorial:
• How to Shoot Projectil...
Link to my "AOE Damage & Healing" tutorial:
• How to do AOE damage a...
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 RU-vid 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
/ discord
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
/ alizoh
Checkout my other tutorials on my channel:
/ @alielzoheiry
Chapters:
00:00 Outcome of this part
01:07 Assets used
01:56 Creating the PatrolRoute actor
07:48 Assign the PatrolRoute to the Enemy
08:53 Creating a Task to Move Along Patrol Route
10:11 Enemy AI Interface
12:06 Implementing the task MoveAlongPatrolRoute
13:56 Updating the Behavior Tree
14:33 Testing the patrol behavior
15:27 Modify Enemy Movement
23:08 Idle when not patrolling
25:19 Switching between States
28:40 Using Blackboard decorators
30:04 Testing Switching Between States
34:18 Aborting Behavior Tree Tasks
38:01 Sheath Sword Animation Montage
43:13 Sheath Sword Task
44:24 Updating Behavior Tree
48:13 Final Outcome
48:34 Next Up in Part 3
#unrealengine #unrealengine5 #ue5 #gamedev #smart #enemy #combat #AI #blueprint #tutorial #behavior #tree #patrol #patrolling #state

Игры

Опубликовано:

 

4 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 412   
@AliElZoheiry
@AliElZoheiry Год назад
For anyone having issues with the WieldSword functionality, it's good to know that I didn't show how to edit it to include an animation, but it is the same as the UnWieldSword, so if you want to add that animation make sure to also include an event dispatcher (Call onWieldSword) from your enemy blueprint, and update the task to only Finish Execution when OnWieldSword is dispatched (Just like we did in the SheathSword from 40:45 to 44:20)
@djtc2093
@djtc2093 8 месяцев назад
When you say "update the task" - which task or do you mean create a new task for equiping it?
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
@@djtc2093 here I'm referring to the wieldSword task in the behaviour tree, because a lot of people had issues with this, and almost everyone forgot to call finish task (with success true) ONLY when the onWieldSword event is dispatched
@djtc2093
@djtc2093 8 месяцев назад
@@AliElZoheiry 100% - thank you.
@tomerhertz8502
@tomerhertz8502 7 месяцев назад
can you please add the files for this tutorial please? (if you still have the proj files that is)...still heaving problem with it, after i followed your instruction for debugging the WieldSword functionality
@tomerhertz8502
@tomerhertz8502 7 месяцев назад
BTW, the problem i had, was in the SheathSword and WieldSword tasks...i was connecting the finish execute to the bind event instead to the finish custom event respectively in both tasks
@cursedbishstudio
@cursedbishstudio 10 месяцев назад
6.5k views - 222 likes - 104 comments. come on people, don't be so lazy. such minimum effort needed but it means so much to the content creator. 👍
@Hobcakes
@Hobcakes 9 месяцев назад
You're absolutely right and honestly it's a really good video.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
I don't know how I missed this comment 7 months ago. I really appreciate the support 🙏❤️
@storeboughtrocketgames2560
@storeboughtrocketgames2560 6 месяцев назад
These are seriously the best tutorials I've come across. No fluff, great pacing, and even though they're over 40 minutes long each, I know they're worth watching bcz you do such a good job explaining everything, and it's not filled with useless information like modeling a character first, or animating something, straight to the point and topic of the tutorial. Thanks for all your hard work making these AI tutorials, they couldn't have come at a better time for me since I'm implementing a combat system right now. You've definitely earned a subscriber.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey! Thank you soo much for this comment. It really keeps me motivated when I see that my content is this helpful to people, so thank you for appreciating the effort that went into this 🙏🙏
@nholmes
@nholmes 5 месяцев назад
@@AliElZoheiry I'm a game designer with 25+ years of experience working in various proprietary engines and I'm learning UE for the first time. I cannot thank you enough for putting this video together! Teaching this old dog some new tricks! 🤣🏆🎉
@lorenfulghum2393
@lorenfulghum2393 2 месяца назад
You have by far the best, cleanest, most to the point and easiest to follow tutorials I've seen on here. This is helping me resolve a lot of little things I wasn't quite sure about in behavior trees. Now I finally know the RIGHT way to use them.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for your kind words! I'm really glad to hear that my tutorials are helping you out with behavior trees. Your feedback means a lot to me! If you have any more questions or need help with anything else, feel free to ask.
@D3K5
@D3K5 25 дней назад
Your tutorials are absolutely insane and I really enjoy watching them. You really find the right balance of digging into topics, tempo and - my personal highlight - level of coding quality. Looking forward to see and learn more from you!
@AliElZoheiry
@AliElZoheiry 25 дней назад
Wow! Thank you so much for the support Max. This means so much to me, I appreciate you 🙏😊
@leduyminh7813
@leduyminh7813 8 месяцев назад
Amazing tutorials! I've been looking for a detailed tutorial on advanced AI like this for months. Thank you so much :)
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
You're very welcome! Thank you for watching and I hope you enjoy the rest 😊🙏
@HusmanGames
@HusmanGames 4 месяца назад
This series I by far the best taught content I've watched on Unreal here on RU-vid
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you so much for your kind words! I'm glad you found the series helpful and well-taught. Appreciate your support!
@twidiegamers3854
@twidiegamers3854 8 месяцев назад
Amazing tutorials! Learning a lot in here. You just got yourself a new patreon! Can't wait to continue the rest of the tutorials! Keep up the good work!
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
Thank you so much Twidie 💖 really glad that you are finding my content helpful, and i'm really grateful that you joined my Patreon. I appreciate you 🙏😇
@madhisaranadasa1410
@madhisaranadasa1410 9 месяцев назад
Best Unreal AI content I have seen. Amazing work!
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you ❤️ really glad you found it useful
@saucythighs
@saucythighs 26 дней назад
I like that the way you design these, you are using best practices for how you would set it up for an actual game. Most tutorials just focus on getting it functioning superficially for the purpose of the video.
@AliElZoheiry
@AliElZoheiry 25 дней назад
Thank you for your comment! I really appreciate it. My goal is always to make sure the tutorials I create are not only functional but also designed with a real-world game development approach in mind. I'm glad you noticed that! 🙏
@trelaskillz
@trelaskillz 6 месяцев назад
I've only been building BluePrints for about 3 weeks and I was able to follow along easily with a few minor debugs needed for my own errors. Thanks for the great work and I look forward to watching the next one in your video list!
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
That's great to hear! I'm very happy this was beginner friendly as well. The aim for this series is to be beginner friendly while still teaching intermediate and experts a lot of new things.
@sergimorpalou206
@sergimorpalou206 8 месяцев назад
very well explained, without having much idea of English I understood everything! For the following videos, thank you very much! greetings from BCN
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
Hey Sergi, thank you for the support, I'm very happy you found this useful ☺️🙏
@pwnonator
@pwnonator 9 месяцев назад
This tutorial is everything i pretty much been looking for so far. Wow
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Glad it was helpful! Thank you for watching 🙏
@Clydiie
@Clydiie Год назад
This has really helped me alot I was so scared to get into making ai but you have made it so clear and easy to follow I still dont understand ai but I understand more than I did so thank you so much! I'll be sure to credit you when I make my game!
@AliElZoheiry
@AliElZoheiry Год назад
Really happy I could help you Gameboy, I appreciate the support, and looking forward to teaching you more.
@Clydiie
@Clydiie Год назад
@Ali Elzoheiry I'm currently watching and following part 3, and I'll be very excited to see what you do next!
@nishanthapaliya4444
@nishanthapaliya4444 2 месяца назад
Starting this series after completing load and save system which was fantastic. You teaching style is amazing - problem and solution based which i found very helpful in learning process. Just leaving this comment to encourage you to produce more videos in more series especially in multiplayer system login using facebook/google, messenger style chat using dedicated server , and save and load in multiplayer system. Keep up the good work man . Cheers 🎉
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Hey, thank you so much for your kind words and suggestions! I really appreciate the support and I'll definitely keep your ideas in mind for future videos. Cheers! 🎉
@unsolvedbc
@unsolvedbc 29 дней назад
Amazing!! As per usual, loving this series so far, thank you!
@AliElZoheiry
@AliElZoheiry 28 дней назад
So happy to hear you're enjoying the series! Thank you for your support 🙏
@supa76
@supa76 6 месяцев назад
thanks so much. I am quite a noob with unreal AI, and I followed along quite easily and had no problems getting to work.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
You're most welcome Supa, always happy that I could help ☺️🙏 thank you for watching
@Mario543212
@Mario543212 8 месяцев назад
Amazing channel! I'm gonna binge-watch all your videos.
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
Glad you like it that much. I appreciate your support 🙏
@HandsOnKnowledge
@HandsOnKnowledge 10 месяцев назад
Learned so much from the firs episode of this series. I didn't know anything about behaviour trees and after watching the first episode and then practising on my own I am a lot more comfortable with it. Thank you Ali you are my Unreal Sensei, keep up the excellent work :)
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
I'm very happy to hear that, you're welcome man, thank you for watching 🙏
@oscblade1691
@oscblade1691 2 месяца назад
I'm loving this tutorial series so far great work keep it up
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for the positive feedback! I'm glad to hear you're enjoying the tutorials.
@pablochamarra8246
@pablochamarra8246 2 месяца назад
Once again great stuff, completely devoured this tutorial. Love.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for your comment! I'm thrilled to hear that you found the tutorial helpful and enjoyed it. Stay tuned for more great content! 🙏
@jbtnproductions7245
@jbtnproductions7245 2 месяца назад
Look, I'm Brazilian and I understand very little English, but honestly what fantastic teaching, even with little understanding your content is very complete and explanatory, I would definitely buy something from you, you're very good at what you do, you deserve recognition
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Obrigado! Estou muito feliz que você está achando útil, a sua mensagem me motiva muito. Muito obrigado pelo seu apoio!
@user-pn3ut7rw6c
@user-pn3ut7rw6c 5 месяцев назад
Amazing tutorials! Learning a lot in here. Keep up the good work!
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much for your kind words! I'm thrilled to hear that you are finding the tutorials helpful. I'll definitely keep them coming. Keep up the great learning!
@sajjadmirshabi
@sajjadmirshabi Год назад
Awesome, thanks you Ali. Been waiting for it
@AliElZoheiry
@AliElZoheiry Год назад
Hope you enjoyed it Sajjad and thank you for the support. Part 3 is coming out soon as well
@user-xv6hh8iw8m
@user-xv6hh8iw8m 10 месяцев назад
Awesome, thanks you Ali.这是我见过最好的AI教程
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
You're welcome 🙏 I'm very happy that you enjoyed it 😊
@vidmaster7
@vidmaster7 Год назад
Hi, Ali. I am learning so much from your tutorials. I do have one suggestion. Make sure that what you are referring to is visible on the screen. There are many instances where what you are typing is cut off. This is true whether it is in the window or full screen. Thank you for the hard work on these tutorials. This is helping me understand AI.
@AliElZoheiry
@AliElZoheiry Год назад
Thank you, I indeed noticed this in a few other videos, In my latest 2 videos I started only zooming on important details which would otherwise be too small on screen, so hopefully this issue isn't happening anymore
@cliffianson4146
@cliffianson4146 Год назад
oh yes ,been waiting for this. Thanks
@AliElZoheiry
@AliElZoheiry Год назад
Thank you Cliff! Hope it has what you need, and definitely more to come soon 🙏
@TheFalcoGamingDK
@TheFalcoGamingDK 5 месяцев назад
Hey Ali! Great work with the video. Proberly the best guide in the world ngl.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you for the kind words! I'm really glad you found the video helpful. Your support means a lot!
@youseiy
@youseiy Год назад
Thank you soo muchhhh!! im a C++ developer and making a stealth game, sadly the ai documentation is very bad and usually i take the Bp logic and translate to c++ in a optimal way. You r awsome!
@AliElZoheiry
@AliElZoheiry Год назад
Yeah the documentation for C++ is quite lacking, I will be making some C++ tutorials as well soon because some systems are only available in C++ so stay tuned ;)
@0xJarry
@0xJarry 8 месяцев назад
Loving my journey through these tutorials... I stopped right before the end and was going to add another decorator for "IsFocused" and got hung up a bit... clicked play and 2 seconds later you went into the focus fix 🤣
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
Hahaha awesome, glad we were on the same page there
@arturkozanowski1499
@arturkozanowski1499 2 месяца назад
Man you are the one of my the best explores in this year. Really. Bow for your efforts.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for your kind words! I'm thrilled to hear that my content has been helpful to you. It means a lot! 🙏
@ericcrary2380
@ericcrary2380 5 месяцев назад
Ur series is amazing and you are very appreciated
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thanks so much for saying that. I appreciate you too 🙏
@WiseBefore
@WiseBefore Месяц назад
Im a complete noob and managed to follow this great (yet complexed) tutorial.. I kept leaving comments asking for help but then would follow the logic from what I asked and debug.. Then comment again with a new problem and delete as it changed aha. This is my final comment to say thank you.. Most my issues were to do with leaving a box unchecked or not connecting a pin for example I hadnt connected WeildSword to execute Bind event in the BTT_weildSword and in Sheathe sword so the BT wasn't finishing the task and getting stuck haha.. Having the comments to read through definitely helped me to fill in gaps on parts I had missed or you had done outside of the edit. Thanks for another great tutorial. Took me about 4 hrs as a noob to troubleshoot my mistakes :)
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey, thanks for sharing your journey with the tutorial! It's really great to see how you were able to troubleshoot and solve the issues on your own. Your perseverance definitely paid off. Glad the comments were helpful, and I'm happy you found the tutorial useful. Keep up the great work!
@deltacake3809
@deltacake3809 Месяц назад
Great video, thats what I was looking for
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey there! Thank you for watching and commenting! I'm glad the video was able to help you out 🙏
@eugeniivakulenko5281
@eugeniivakulenko5281 3 месяца назад
Thank you very much sir! Your tutorials are super useful!
@AliElZoheiry
@AliElZoheiry 3 месяца назад
You're very welcome! I'm glad you found the tutorials helpful. Thank you for watching and commenting 🙏
@callatogames
@callatogames 16 дней назад
Great Tutorial, thanks man :)
@AliElZoheiry
@AliElZoheiry 11 дней назад
You're very welcome! I'm glad you found it helpful 🙏
@DannyshRosli
@DannyshRosli Год назад
Hi Ali , im really excited about the series . Im just bum out that sometimes i dont understand your math, especially the Patrol Index. Im trying my best to understand it, had to crush my head. Hopefully ill knock some sense into my own brain :D
@AliElZoheiry
@AliElZoheiry Год назад
Hey Danny, let me try to explain it simply. The patrol index is just the point on the spline that the enemy is currently on starting at 0 (meaning the first point) so when the enemy moves to the next point we need to add 1 to that index (so then the patrol index is equal to 1 which means the enemy is at the second point in the spline) then we need to check if we reached the end of the spline, by checking if the index is equal to the number of points in the spline (but minus 1 because we started at 0 not at 1) then if we reach the end we just start subtracting 1 from the patrol index instead of adding 1 (this we change the direction to be -1) and do the reverse once we reach point 0 on the spline again. Hope it makes more sense now
@DannyshRosli
@DannyshRosli Год назад
@@AliElZoheiry Hey Ali ! Thank you very much clearer now , thank you so much !
@udoma8
@udoma8 Месяц назад
@@AliElZoheiry My thought since has been how you figured out this particular logic, it is clean and also very uncommon while looking common
@Sebbx8
@Sebbx8 6 месяцев назад
Excelent tutorial, you are my favorite now
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you! Glad you are enjoying them 😇🙏
@jedtanartkulprakrom4616
@jedtanartkulprakrom4616 Месяц назад
Thank you teacher Ali. Like part 1 your tutorial are very detail moreover your teaching and how you explain are really amazing. I also consider WieldSword function that didn't show in video as homework. Even now I cant count the spline point and don't know why it need to -1. The Spline point function are the last thing that I cant understand. Also it took me nearly 2 month to understand overall how the function operate, That make me realized how I lack of the foundation [Gonna cry in corner]
@DaviesMurphy
@DaviesMurphy Месяц назад
for example you have 10 spline point in your patrol spline point index 0 = spline point 1 ... ... ... spline point index 9 = spline point 10 index as defaulf start 0 but your point of number going 1 , 2 , 3...
@jedtanartkulprakrom4616
@jedtanartkulprakrom4616 Месяц назад
Thank you so much
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey there! Thank you so much for your kind words and for sharing your thoughts. I appreciate your dedication to understanding the concepts. Don't worry, taking your time to fully grasp the material is commendable, and it's okay to take a bit longer to fully understand everything. Keep going, you're doing great! 🙏 P.S, checkout the response from @DaviesMurphy, it sheds light on how incrementing the spline point works! Thanks for that Davies
@ryanjdevlin87
@ryanjdevlin87 8 месяцев назад
Thank your for this series this will help me alot :) thanks so much
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
You're very welcome! Thank you for watching :)
@raduvady
@raduvady 8 месяцев назад
really great tutorials, thank you very much
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
You're very welcome! Thank you for watching
@newtforgegames
@newtforgegames Год назад
These videos have been such a help! Thank you and keep it up! +SUB!
@AliElZoheiry
@AliElZoheiry Год назад
Thank you for the support 🙏 I'm always happy to hear that my tutorials are helping people, I hope to continue helping you :)
@electronicinfection
@electronicinfection Месяц назад
Thanks a thousand times!
@AliElZoheiry
@AliElZoheiry Месяц назад
You're very welcome! I'm thrilled to hear that you found the content helpful. Thanks for the feedback! 🙏
@KittehBit
@KittehBit 4 месяца назад
These videos are really good :)
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you so much for your kind words! I'm really glad to hear that you're enjoying the videos. If you have any specific topics or requests, feel free to let me know. Happy learning!
@warehousevirtuals
@warehousevirtuals 10 месяцев назад
I liked and subbed with all 3 of my accounts, i will be teaching these concept to my friends, thank you
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
Thank you for the support 🙏 really glad you find it useful
@h9rr9r_80
@h9rr9r_80 6 месяцев назад
This tutorial is great thank you
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
You're very welcome! Thank you for watching 🙏🙂
@user-xj2pf4pl9p
@user-xj2pf4pl9p 6 месяцев назад
love it very helpful
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Great to hear that! Thanks for watching and commenting
@jarofpickles1246
@jarofpickles1246 9 месяцев назад
In the behavior tree tasks that you create you are casting to the enemy base class. Do you think it would be more efficient to either update the BBkey through the enemy blueprint by using "get ai controller>get blackboard>set blackboard value as..." OR would it be better in the behavior tree to cast only once and store the enemy reference instead of casting every created task?
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Once we start adding the enemy AI interface, I won't be casting as often since I'll be calling interface functions, but in general, casting isn't a performance heavy operation, so you can cast on each tick, hundreds of times and it won't be a performance issue unless it's thousands of times per tick
@gufranyesilyurt
@gufranyesilyurt 8 месяцев назад
For anyone having issues about being stuck in A state of flip-flop, hence not being able to change states. The problem might be the keyboard key. You can try using the enhanced input system. I first had a problem with the "Tab" button, but when I used it with the enhanced input actions, the problem was solved.
@nholmes
@nholmes 5 месяцев назад
These videos are great! I find myself stumbling through UE5, how did you get to the point where you could build behavior trees, tasks and functions on the fly?
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you! I'm glad you're finding the videos helpful. Building behavior trees, tasks, and functions became easier with practice and experimentation. I recommend trying out small projects to gradually build your skills and confidence in UE5. Keep experimenting and learning - you'll get there!
@tucaja1240
@tucaja1240 10 месяцев назад
amazing bro, gracias
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
De nada, glad you liked it !
@muhammetemirbulut6511
@muhammetemirbulut6511 10 месяцев назад
thks for this series
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
You're very welcome 👍
@ragnorucca6637
@ragnorucca6637 Месяц назад
Great videos @AliElzoHeiry one small thing and im not sure if its covered in a later video but the character jitters a bit in animation when it reaches the spline point. like its deciding whether to keep walking at the next spline point. can this be made smoother somehow or is it just the nature of using splines?
@AliElZoheiry
@AliElZoheiry Месяц назад
You can play around with the character movement settings, things like declaration and acceleration speeds and friction, etc.. these can help you get a smoother effect
@perrobravomx4206
@perrobravomx4206 9 месяцев назад
Awesome video! thank you so much again for your incredible capacity to explain things. 10/10 would recommend.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
You're very welcome, I'm glad you found it useful, and I appreciate your support 🙏☺️
@konspiracni_teorie_official
U ARE GOD ! MORE TUTORIAL LIKE THIS !
@AliElZoheiry
@AliElZoheiry Год назад
Thank you Marcus. I hope you enjoy the rest of the series 🙏
@konspiracni_teorie_official
@@AliElZoheiry I will check every your tutorial and hope you will continue, u are doin greet job !
@oerealrap
@oerealrap 11 месяцев назад
omg i figured it out all good aha thank god aha aweosme
@AliElZoheiry
@AliElZoheiry 11 месяцев назад
Nice! Glad you figured it out. Mind sharing with the people here what the problem was and how you fixed it?
@roja
@roja Год назад
Amazing!1
@clebo99
@clebo99 Месяц назад
So a few things...I'm going to hang with this but you move a little too fast and I think you forgot to show what you did around 41:00 regarding the changes you made to the initial Weird Sword. But so far I'm liking it.
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey, thanks for your feedback! I indeed didn't show the changes to the WieldSword, because they are exactly the same as the SheathSword event, and I showed the event in the blueprint, so you can pause and see what's happening there if you'd like
@proxima7199
@proxima7199 11 месяцев назад
Hey, thanks for the tuturial! What can you say about Advance Locomotion System library? Have you tried it?
@AliElZoheiry
@AliElZoheiry 11 месяцев назад
You're welcome mate I haven't tried ALS myself, but I've seen it un multiple projects and it seems very good and flexible , so it's a good start for getting something done quick, but if you want your character movement to be unique for your game, then building your own is better
@Darryd
@Darryd 5 месяцев назад
Just out of curiosity, I'm just trying to make a simple Souls-Like Boss fight, I have the basics for the AI BT you've shown in the 1st episode, I was wondering what videos in order I could watch to get to the final 3 videos without missing anything important. For reference the character I'm following with is the boss I just don't need him patrolling/ hiding to get health if that makes sense? Love the series though and will definitely be coming back to learn more soon! 😄
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Hey Darryd, not sure I can tell you which videos to skip because the entire series is built sequentially, so there might be a slight change I make in one video that is used in a later one. What you can do though is check the "chapters" that are timestamped in each video, and they will give you an idea on the contents of that video, then decide whether to skip it or not
@theindiegamedude
@theindiegamedude 11 месяцев назад
Great content so far! My AI has been severely lacking. And, these videos are just what I need. I'm wrapping up for the day. I've only had one issue that I cannot seem to figure out. When I press "1" the first time, everything works great, and I created an UnsheathSword Montage similar as you did, and spawn the sword using a Montage Notify as usual when working with Notifies. But, the Enemy will not turn to face the Player as it unsheathes the sword. It will unsheath, then turn to the Player everytime. I've tried playing around with different things, and I'm not quite sure what is going on. Other than that everything looks great. I've debugged the AI Behavior Tree, and it looks like it flashes by the BTT_FocusTarget(with AttackTarget as the Attack Target Key) and goes directly to the BTT_UnsheathSword I created under the BTD_IsWieldingSword Decorator. That is all within the first sequence. The numbers on the nodes look correct. I'm not sure why it is skipping the BTT_Focus Target Task though. EDIT: For now, I'd just added a Wait 0.5 Seconds Node to the middle of the sequence. So it will Focus wait half a second, then unsheath the sword. This gives the AI enough time to turn and face the player, even if directly behind the AI. Using 5.2.1, but don't think much has changed in this regard.
@AliElZoheiry
@AliElZoheiry 11 месяцев назад
Thank you! Glad you've been enjoying the content If your AI is taking a long time to turn it could be the rotation speed of the enemy character is slow. If you're not using the default manny character and default settings, make sure to match it to the default manny settings for rotation speed and see if it helps
@theindiegamedude
@theindiegamedude 11 месяцев назад
@AliElZoheiry - Thanks for the tip! I was actually thinking the same thing when I woke up this morning. Oftentimes, I wind up waking up with a proper solution XD Just got in from some morning endurance cycling. I'm going to get going on my projects in a half hour. And, this will be the first thing I test. Adjusting the turning/rotation speed on the ai mesh.
@Dominicn123
@Dominicn123 7 месяцев назад
hey man, did you figure it out? i'm having the exact same issue as you and i don't think it's the rotation speed
@theindiegamedude
@theindiegamedude 7 месяцев назад
@@Dominicn123 - Sorry. I never did figure out the issue with the enemy not facing the player. I just left in the Wait half a second node to the AI Tree which I mentioned above. At this point I think I'm running off a copy of one of Alizoh's source files I downloaded a while back. I didn't think of looking for the change in the source for that particular issue. When I downloaded the source project, and started working off of that.
@tc8557
@tc8557 Месяц назад
quality vid!
@AliElZoheiry
@AliElZoheiry Месяц назад
Thanks for the support! Glad you enjoyed it 🙌
@WaHBz86
@WaHBz86 Год назад
Hey great video! Just one thing, in my project, when drawing the Ai's sword, the Ai slides towards me as he is playing the animation. Once sword is unsheathed. Would you have a clue as to why the Ai slides during the draw sword animation? Cheers!
@AliElZoheiry
@AliElZoheiry Год назад
Thanks Wahbz! Regarding your issue it could be a number of things so I can't tell you exactly the cause of the issue, just make sure to retrace your steps, debug your tree and see what's firing when and why by adding print statements
@kristopherjones5991
@kristopherjones5991 Месяц назад
Thanks for these awesome tutorials! I do have one issue with the Blackboard Decorator that is on the CombatState Selector. With it on, the enemy only runs the PassiveState side of the BT. With it off, the enemy will try to move to AttackTarget, but slingshots around the area never actually reaching the player. I don't know what the issue is, but any insight would be much appreciated.
@AliElZoheiry
@AliElZoheiry Месяц назад
I'm not really sure I understand the issue, but if it is regarding the decorator not succeeding/failing correctly, then I suggest checking the implementation of the decorator and seeing when it returns false/true. Otherwise, some common mistakes are: - Using "Selector" when you mean to use a "Sequence" node - Setting the wrong input parameter to a decorator or task
@cherrygod3787
@cherrygod3787 2 месяца назад
you are really best, im deleted my old ai system in only BP and im trying to use now BT. You are best man and you are best man again and you are best best man. Change your channel name to "BEST MAN"
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for your kind words and support! I'm really happy to hear that you found my content helpful as you transition to using behavior trees. I appreciate your enthusiasm and encouragement!
@PokeGameTCG-Oficial
@PokeGameTCG-Oficial Месяц назад
Excelent Video, I have a doubt, in my case my character when he appears on the map makes the animation of drawing his swords, but I want him to not move while he is doing it, so I put a wait at the beginning of the Passive State, it worked but then to advance point o'clock it is also expected, do you know how to make the wait only at the beginning and not repeat itself anymore, thank you.
@AliElZoheiry
@AliElZoheiry Месяц назад
If your character is doing an action and that action is triggered by a behavior tree task, then you shouldn't Finish the task execution until the action has ended, that's why I added the event dispatcher in the wield and sheath sword functions, to tell the task that the animation is over and you can move to the next node. This is what you should do as well, because a wait node won't work for all animations since they have different timings
@jocslzr1
@jocslzr1 7 месяцев назад
@AliElzoheiry Thanks so much for this tutorial, I’ve been looking for something like this for days, and finally found it on my recommendations. I am having a weird issue with the Behavior Tree where my Set Movement Speed Task keeps resetting itself to "Idle" every time I close and reopen the Engine. Do you have any idea of what could be causing this?
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey, you're very welcome 🙏 I've experienced this issue with some BT tasks as well. I found that deleting the task and adding a new one sometimes fixes it
@jocslzr1
@jocslzr1 7 месяцев назад
@@AliElZoheiry Yes! Thanks for replying, I fixed it by closing the BT before closing the engine, I think it might be a bug related with autosave. It’s been causing some issues for me lately.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Just one of those weird engine bugs I guess, glad you fixed it 💪@@jocslzr1
@matka5130
@matka5130 7 месяцев назад
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
😊🙏
@projectgg6730
@projectgg6730 2 месяца назад
In the tasks should you have an is valid off of controlled pawn? In my case I'm going to have a bunch of zombies. COD zombies style. And in my prototype (where I just used blueprints instead of behavior trees) I'd get all kinds of errors when they died unless I put is valid like everywhere lol
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey there! It depends on how you implement the death logic. If you unpossess the pawn from the controller, then you should stop the logic of the behavior tree anyway, so it doesn't matter if there is an isValid check. Generally, if you're controlled pawn is ever inValid, then that means you have something else wrong in your implementation, because that case should never occur
@BROCKSGAMING
@BROCKSGAMING 6 месяцев назад
The more better way instead of using a Interface or Cast is to Store Data in ActorCOmponent , this is a great feature using which we not only make Less Coupled things but also modular things
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey Brock, thank you for the feedback. I indeed use actor components heavily later in the series when I start integrating a damage system and attack system
@BROCKSGAMING
@BROCKSGAMING 6 месяцев назад
@@AliElZoheiry I see, that's great then and btw I loved your end result that's why I started watching, if you could make a enemy which can predict player moves like attack, flank
@Shino2213
@Shino2213 Год назад
Hey Ali, i was having an issue with reversing the sheathsword animation. the enemy would'nt play the montage if its reversed, but he was able to play it unreversed. i checked the BT. and when id swap to the attack state, it would just get stuck on wield weapon and he would'nt wieldSword. If i use it not reversed, functionally it works and hes able to spawn the weapon. Im not sure why that is, everything seems correct. Could it be the anim notify ? it works fine on the sheathsword animation, but should i do something else if i reverse the play rate of the animation ?
@AliElZoheiry
@AliElZoheiry Год назад
Hey Shino, not really sure what the issue is, but if the montage notify isn't being triggered in the reversed montage, try deleting the notify and adding it again, it often happens that notifies become null when you make changes to the montage after adding it
@ThadeousM
@ThadeousM 6 месяцев назад
@Shino2213 I got stuck here to. My issue was, I had used the wrong method to reverse the animation. Check that you have changed the PLAY RATE by clicking the animation segment in the montage timeline Make sure you have not changed the RATE SCALE like I had! Plus reseting the also helped
@JyotiEntertainmentProduction
@JyotiEntertainmentProduction 2 месяца назад
Really Appreciate your teaching Sir. Followed along with my custom Ai as Zombie from Mixamo. Everything works fine, except after SHEATHING THE SWORD, the Ai is not going back to the BTD_HasPatrolRoute Sequence. It got stuck on the BTD_ISWieldingSword Condition forever. I don't seem to figure out the problem! Can you kindly help?
@AliElZoheiry
@AliElZoheiry 2 месяца назад
One possible solution to this problem could be related to the event dispatchers and binding in the behavior tree task. Make sure that the event dispatcher for when the sheath sword event has finished is firing correctly and that you are binding to it correctly in the behavior tree task. Additionally, you can debug your code to narrow down the problem. You can check what's happening step by step to identify where the issue might be occurring. If you still haven't found a solution, you can also refer to my bug fixing video for some tips on troubleshooting bugs. Here is the link to the video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-lflqdan_isw.htmlsi=bOIk8RofIkZ9n5_I I hope this helps you in resolving the issue with your AI.
@Poske_Ygo
@Poske_Ygo 4 месяца назад
Nice guide. algorithm. + like.
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Glad you found the guide useful! Appreciate the support 🙏
@Im_pro_true16
@Im_pro_true16 2 месяца назад
Hi, I wonder is there any way to make the ai follow a specific patrol route when spawned, like for example an ai spawner when the ai is spawned, how to make that ai follow a specific patrol route, thank you. Btw love your vids!!
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Hey there. This is the topic of the video, how to make a specific route and have the AI follow it, not sure if you meant something else
@oerealrap
@oerealrap 11 месяцев назад
aha i for the life of me cant seem to find current index or set current index or idex only the variable but doesnt look to same and cant plug in two variables aha what do i do
@Dominicn123
@Dominicn123 7 месяцев назад
hey Ali, i've been really enjoying your lessons on this as i've been trying to do this whole playlist, everything was amazing up until about 70% through this video when it came to flip flopping between hitting the '1' key... i can see many others are having issues as well. i've tried a few fixes and i just can't figure out where the issues are, i've thoroughly scanned the nodes to make sure they're all connected exactly as yours as well, they are good. but could we skip this portion where we press the 1 key, and be good? because in the following videos we're setting up the ai to act independently, so i don't see for there to be any need to set up my ai with the 1 key, would i be able to continue and be good if i skiped the last portion of this video? because we won't be using it later right?
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey Dominic, the functionality of pressing 1 to get to the enemy to follow you is just for testing, but if it's not working, that probably means you have another issue with the enemy behaviour that will still occur even if you skip that part. Most people who were facing this issue were having different bugs. Some related to the event dispatcher not being called or binding incorrectly, some had bugs in the behaviour tree, etc.. so it could be anything. If you're interested in learning how to better find and fix bugs, I have a video on that ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-lflqdan_isw.htmlsi=uuNEQicb9ihrna48
@Dominicn123
@Dominicn123 7 месяцев назад
i just became a patron so i'm gonna check out your project files@@AliElZoheiry
@Dominicn123
@Dominicn123 7 месяцев назад
okay so i have it downloaded from your dropbox link and have it now opened, its way different so i'm assuming this is the final project from the end of the series as well, so it has a ton of different things on it, everythings changed around from this episode, do you have project files per episode or is it all just one file?@@AliElZoheiry
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
@@Dominicn123 unfortunately I don't have the project saved after every tutorial, that would fill up all my cloud storage very quickly 😅
@ong8163
@ong8163 7 месяцев назад
me too
@TheHanmaru
@TheHanmaru 3 месяца назад
Hi, Nice tutorial!! I have a question. I followed yours but my default AttackTarget can't find target (It shows "None") when I game start and doesn't attack me. If I toggle manually, It works good. How do I can solve my problem? Thanks!
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Hey there, glad you enjoyed it! If you are referring to the blackboard value reverting back to none when you restart the engine, that’s unfortunately a known issue with unreal engine, if you delete the node and create a new one, it often fixes it
@WeAreNIM
@WeAreNIM 6 месяцев назад
I cannot get the NPC to move to spline points. I'm not sure where the breakdown is because the AI debug says it's the current task, but the NPC doesn't move. I went back through the tutorial twice and I don't know what I'm missing. The only thing that I've changed from the original tutorial is I promoted the Acceptance Distance to an exposed variable on the AI Move To inside the BTT_MoveAlongPatrolPath task so I could modify it directly from the main behavior tree, and replaced the Scene Root Actor with a custom sprite billboard that is easier to find among all my world objects - I'm still able to assign the BP_PatrolSpline actor to the NPC, so the reference isn't broken as far as I can tell, and it's not abandoning the task when I put it on a selector to choose between patrolling and chasing, so I have no idea why it won't move. I haven't gone beyond timestamp 15:25 because AFAIK the implementation is broken somehow and it shouldn't be an issue with UE 5.3 - does anyone have any helpful advice for what I could be missing? Any help is appreciated.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey, I can't really tell what your bug is just from this description, so I suggest that you add breakpoints or print statements in the patrolPath to see if it's printing the values you expect, that will help narrow down the problem. If you still can't figure it out, feel free to join the discord server and ask your question in the help channel there with more details and screenshots (Link in the description)
@user-kv6sg3gq2d
@user-kv6sg3gq2d 11 месяцев назад
In my UE5.2, at 29:13 in the video, the key query option does not show "Equal to", instead it shows two "Not Equal to". Do you know the cause of this? The cause may be the version. Which type of UE do you use?
@AliElZoheiry
@AliElZoheiry 11 месяцев назад
That's very strange 😅 there should definitely be an equal to, regardless of what engine version you're using. Try restarting the engine and make sure you don't have any weird 3rd party plugins enabled that might mess with the default settings. Also check different projects to see if they have the same issue, that would narrow down if it's an engine problem or a problem with the settings of a specific project
@user-kv6sg3gq2d
@user-kv6sg3gq2d 11 месяцев назад
@@AliElZoheiry I don't mean to deny that, I changed the version to 5.0.3 and it worked. LOL. Apparently there is a bug in 5.2.1.
@alessioribaldi6373
@alessioribaldi6373 5 месяцев назад
im having an issue, when i restart the engine in the behavior tree in the tasks BTT_MovementSpeed, the value of the speed of the enum resets to idle, even if i save the BT and so the enemy at the engine restart wont move, because it is resetted to idle, can you help with that? Btw best tutorial series
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Hey there! This is indeed a known issue with unreal engine, I found that sometimes deleting the task and adding it again, prevents this issue from happening, but not always. Give it a shot and let me know
@Chatmanstreasure
@Chatmanstreasure 10 месяцев назад
Do we make a Patrol Route for each Enemy? If we want say 5 enemies walking around in different areas? Also can you have 2 npcs on same Patrol route?
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
Right now, since the Patrol index is stored in the patrol route itself, then we can only have 1 enemy per patrol route. Otherwise if we assign 2 enemies to the same route, then when one enemy increments the index, the other will do the same as well. To fix that, you can just store the Patrol index on the enemy itself instead of in the patrol route, then you can have multiple enemies on the same patrol route
@Chatmanstreasure
@Chatmanstreasure 10 месяцев назад
@@AliElZoheiry Thank you...appreciate it...I also noticed you respond to almost if not all comments...don't see that much. Appreciate all you videos
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
@@Chatmanstreasure I surly try to respond to everyone, within a day or 2 if I can, sometimes I just don't have the answers though 😅
@amiryari5239
@amiryari5239 5 месяцев назад
Your great 😃
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much! I really appreciate your kind words and support. 😊
@driftmirror
@driftmirror 8 месяцев назад
Hey, not sure if this is addressed at some point but at the end of the last tutorial, the enemy snaps to the new direction it's moving in instantly. How do you make it turn smoothly like you have starting in this video? Awesome series of videos BTW! Very clear explanations and I'm learning a lot. Thanks for sharing your knowledge!!
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
You're very welcome. glad you're enjoying it and finding it useful so far. Regarding the enemy rotation speed, if your enemy is not rotating smoothly, then this is likely due to the "rotation speed" variable on the characterMovement component in your pawn class, try adjusting that and seeing if it helps
@driftmirror
@driftmirror 8 месяцев назад
@@AliElZoheiry I had to turn off "Use Controller Rotation Yaw" checkbox for it to turn smoothly. It wasn't respecting the rotation rate at all initially.
@dreambadger
@dreambadger 7 месяцев назад
@@driftmirror This is the answer. Also, you can still set the rotation speed on event begin play from the character movement component - thinking about it though I could just change the default. One thing I do is that when my enemy attacks, I set the rotation speed down to like 30-50 from the montage exit pin, which gives the attack some give without glueing to the player, like if you're running near an enemy and it attempts a claw attack or something, and then on montage complete or interrupted pin, i set back to my standard rotation speed of 120. Think about smoothing on your blend spaces too. i had an awful animation jank on a creature when it would close the distance with the player, then initiate attack montage and the legs would just move to quickly. It was essentially the blendspace speed approaching 0 (idle) that I forgot to apply any smoothing to. So I set to one second and it's a relatively smooth transition now. I'm really happy how Ali's tutorials are working in my prototype.
@erikfischer5021
@erikfischer5021 9 месяцев назад
I'm sorry, I am having trouble assigning the patrol route spline to my character. I can't find any linkable parameters in my BP_Enemy_Base to the spline and your Video is blocking the view at 8:50 Any clues? Great tutorial btw!!! Congrats!!!
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hey Erik, so the "PatrolRoute" variable we created in the enemy class should "Instance editable", which means you need to click on the "eye" icon next to the variable name in your blueprint, or make sure the checkbox for "Instance editable" is checked. Then when you select on your enemy in the World. You can search for that variable in the details panel and assign it the value of your patrol route (which also has to be placed in the world first)
@erikfischer5021
@erikfischer5021 9 месяцев назад
THX!!!@@AliElZoheiry
@ericcrary2380
@ericcrary2380 5 месяцев назад
Thank U!!!! U are the best. @@AliElZoheiry
@tomashorsky3316
@tomashorsky3316 6 месяцев назад
Hello. In the video at 32:40, you add "Cast to AIC_Enemy_Base". When I press 1, it stops right at this Node. The cast simply fails. What could be causing this? Thank you
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
The only reasons for the cast to fail is either you are casting to the wrong class, or you didn't set the AI controller to the pawn
@BooneyianLogic
@BooneyianLogic 7 месяцев назад
(SOlVED)I've had an issue with the Switch on name nodes after the animation montages not executing's. I troubleshooted and found that the animation montage is blending out and completing without firing the notify. I have moved the notify to the very first frame of the animation montage, this hasn't seemed to help. I was just making notifies in the animation montage, not using the "Montage Notify" once i created These Notifies. It works
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
That's indeed a common issue. I talked specifically about that one in my "How to fix bugs" video
@shivc03
@shivc03 3 месяца назад
Amazing tutorial. I do have a small problem. When the enemy reaches one of the spline points it waits for halve a second and then continues to move again, but it doesnt smoothly continue as shown in your video. Any idea why this is happening?
@AliElZoheiry
@AliElZoheiry 2 месяца назад
It could be the character movement settings you have are different, things like acceleration and friction can affect the movement of your character. I am personally using all the default settings that come with the UE mannequin (except the things I changed in the tutorial)
@oerealrap
@oerealrap 11 месяцев назад
aha it wont move along the path just stays still and it keep trying to find the path sha what am i doing wrong
@cliffianson4146
@cliffianson4146 Год назад
I have just come to the section near the end and to the Behavior tree and noticed yours has changed in the passive state from the first video, but haven`t showed what you did.
@AliElZoheiry
@AliElZoheiry Год назад
Ahh good catch Cliff, I must have changed it when I wasn't recording and forgot to update that part. If you would like me to explain something in Discord, feel free to ask your question there and I'd be happy to answer
@hype._.
@hype._. 2 месяца назад
9:36 Use interface instead of casting (because the 'increment patrol route' function will apply to all types)
@hype._.
@hype._. 2 месяца назад
Thank you very much😲
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you for the suggestion! I appreciate your input on using interfaces for a more versatile solution.
@hype._.
@hype._. 29 дней назад
8:38 (in Scene)
@showcast4371
@showcast4371 2 месяца назад
@AliElZoheiry buddy my AI whenever reaches the point of the spline it slows down and almost stops for a 0.1- 0.2 sec, is it possible to nake the movement smooth so that it won't stop on these points and rather run smoothly through the spine
@AliElZoheiry
@AliElZoheiry 2 месяца назад
The AI stops because the MoveTo task finishes and there is a slight delay till the next one (but it definitely shouldn't be 0.1 -0.2 seconds, more like 0.05) if you are experiencing a longer stop that what I have in my example, try playing around the the deceleration values on the characterMovement component (things like deceleration speed, ground friction, acceleration speed, etc..) If you want it to be completely smooth, then you'll have to start the next MoveTo task before the enemy reaches the next point on the spline, meaning that you have to check when the enemy is "almost" at the point, and then start to move to the next one
@showcast4371
@showcast4371 2 месяца назад
@AliElZoheiry thanks i got it how to fix it. Btw Amazing work👍🏻👍🏻🔥🔥
@TrackstarOP
@TrackstarOP 5 месяцев назад
I'm finally up to speed on this video, got everything working, the only issue I am having is with the enemy attack when I am really close. The way it starts is on attack, They focus and run at me to attack, but then when I get really close, the enemy stops turning, and instead, will start attacking in the direction they were looking at until I separate myself with enough distance for them to turn towards me. I tried messing with the "Move To Target acceptable radius "which did help a little, but even at "0" they still wont turn when I am really close. Does this get covered later on, or maybe there is someway to make sure the enemy will always rotate towards me before attacking? This isn't a huge deal, I can always fix this later on for my project. Anyways, thanks for the vid! Cheers! 🙌
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Hey there! Thanks for your feedback, I'm glad you're finding the video helpful. It seems like the issue you're facing might be related to the way the enemy rotation is being handled. I'd suggest checking that in the base enemy pawns character movement you have "Use controller desired rotation" set to true. Hope that helps and best of luck with your project! Cheers! 🙌
@TrackstarOP
@TrackstarOP 5 месяцев назад
@@AliElZoheiry Thanks for the response, yeah I have "use controller desired rotation" set to true, the enemy just didn't want to turn when I was really close to them for some reason so I did mess around with some settings to see if I could fix it. But yeah, everything seems to be working now because in part 4 video the enemy is given a "strafe" in the BT so now they strafe around me while in attack which is perfect. I know you get a lot of comments on this series but I really do appreciate all the help! 🙏
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
My pleasure ​@@TrackstarOPhappy to help where I can 🙏
@Secretlycat31
@Secretlycat31 10 месяцев назад
Hello, I've made progress and have gotten up to Updating the Behavior Tree at 14mins and for some reason my ai isn't moving along to the next patrol route. I've doubled checked the creation of the MoveAlongPatrolRoute and it looks right. It move along and isn't being called even though in the behaviour tree it is being called but doesn't seem to run the BP_MoveAlongPatrolRoute. Any suggestions for what is going wrong?
@Secretlycat31
@Secretlycat31 10 месяцев назад
I found it, I had missed connecting one line
@AliElZoheiry
@AliElZoheiry 10 месяцев назад
Everything working now?
@Secretlycat31
@Secretlycat31 10 месяцев назад
Oh if only :) I've broken down my current issue is coming from the MoveToTarget part on the Behaviour Tree. Atleast when everything is disconnected it isn't running past there. It just loops it very quickly and doesn't attack or do anything. Not sure why either so thats fun@@AliElZoheiry
@Secretlycat31
@Secretlycat31 10 месяцев назад
What things would effect the MoveToTarget part? as I might have messed setting on one of them but going through them I can't tell
@ragnorucca6637
@ragnorucca6637 Месяц назад
im getting a strange issue where when my mannequinn model tries to attack, the frame before he swings he looks another direction away from the player then plays the attack animation facing the player, its only a split second but noticable. not sure if this is due to an animation issue or if the behaviour tree is setting the AI to some other state and its causing that. Any suggestions would be appreciated! thank you :)
@ragnorucca6637
@ragnorucca6637 Месяц назад
i have a feeling its to do with the animation and nothing to do with this tutorial.. perhaps something to do with root motion settings... :( its very strange, the mannequin seems to rotate the same direction just before the attack animation and is always the same direction so depending where im standing in relation to him it can look quite bad he does a 180 sometimes for a split second before attacking
@AliElZoheiry
@AliElZoheiry Месяц назад
He's probably losing the focused target for some reason during the attack, I suggest adding a breakpoint in the flow and seeing at which node it starts failing
@teaguewilson7372
@teaguewilson7372 2 месяца назад
Seems like I can't have multiple enemies near eachother when I have any of them patrolling. I assume that's covered in a later tutorial but I just finished #4 and didn't see a solution yet. Any suggestions?
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Not sure what you mean by having multiple enemies near each other. If you mean that you want multiple enemies to use the same patrol route, then you will need to store the current point on the patrol route in the enemy instead of in the patrol route blueprint (so that it's unique per enemy instance)
@teaguewilson7372
@teaguewilson7372 2 месяца назад
@@AliElZoheiry I’ll try that, thanks! And for whatever reason when I had a patrolling character and an idle or wandering character within sight range they would both freeze. (With two wandering enemies it mostly works)
@dandimensions8897
@dandimensions8897 11 месяцев назад
Hi I can't pull up the increment patrol route when I try and do it on my end I'm wandering if I did something wrong along my end because it doesn't feel like it?
@AliElZoheiry
@AliElZoheiry 11 месяцев назад
Hey, not sure what you mean by "can't pull up the increment route"?
@scjohnson243
@scjohnson243 9 месяцев назад
@@AliElZoheiryTroubleshooting what I think is the same problem now... at 13:39 you pull off of patrol route and add "Increment Patrol". I cant get that to show up (Incremenent patrol attached to the patrol route)
@scjohnson243
@scjohnson243 9 месяцев назад
Ok, figured it out, I assume he drug from "Controlled Pawn" in the Event Receive ExecuteAI, but you need to drag from "Get Patrol Route" node next to it, the actual patrol route.
@oerealrap
@oerealrap 11 месяцев назад
lol wont go along the path i tried everything ste by step but just stands there aha i need help aha
@Arctan95
@Arctan95 15 дней назад
@AliElZoheiry Quick question, at 44:50, you insert another selector here to match the attack state but isn't our "Passive State" already a selector? Can't you just add the BTT_SheathSword, with its decorator directly into the PassiveState? It will run the first time then be skipped the 2nd as the selector moves from left to right? Is there a reason for that extra selector? Just trying to wrap my head around this, absolutely phenomenal tutorial series my friend. Are you an official Epic tutor? Might be something worth looking into as you clearly have a pretty deep knowledge of the engine.
@AliElZoheiry
@AliElZoheiry 11 дней назад
Hey! not sure exactly what you are referring to. But the idea is that the first time the decorator will cause the branch to succeed, thus sheathing the sword. The 2nd time, the decorator will fail because the sword is already sheathed so that will trigger the branch on the right. Hope that makes sense. Regarding your other question, unfortunately no, I am not an official epic tutor, they kinda want me to change my linkedIn to be all about tutoring, and that seems a bit reductive for me
@Arctan95
@Arctan95 11 дней назад
​@@AliElZoheiry ​My timecode was a bit off paused at 45:27 shows it better, you have Passive state (Selector) into another selector, into another selector. The decorator on the top on is just a state check for passive. I'm pretty sure those extra 2 selectors are redundant? They can be removed so it's just: - Selector "Passive state" - Sheath sword as 0 - Patrol sequence as 1 - Wait as 2 Fair enough with the epic tutoring, that's a bizarre requirement.. I only asked because the production quality of these tutorials is exceptional so fantastic work mate, thanks!
@AliElZoheiry
@AliElZoheiry 11 дней назад
@@Arctan95 Ahh i see what you mean! You are absolutely correct, that 2nd selector doesn't add anything, it can be removed as well since one selector with a single selector underneath it will always be picked
@mehface
@mehface 5 месяцев назад
These tuts are fantastic. I am trying to make an AI that patrols to random locations within a radius of 800 units, but only travels a max of 200 units before looking for another location. Plus, I want it to jump first if it needs to turn more than 90 degrees. If I joined your apprentice patreon, is this something you could help me with please?
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Hey, I can surely explain to you a few ways that can be achieved. I can already think of 2 different ways, I can share them with you and you can choose whichever one suits you best. We can also discuss pros and cons of each approach if you'd like
@mehface
@mehface 5 месяцев назад
Thanks very much, I will do that soon@@AliElZoheiry
@kasperlarsson7598
@kasperlarsson7598 7 месяцев назад
This zooming in and out all the time is making me seasick. The quality of the sound and video is great you dont need to do all the zooming. Awesome tutorial series, learning a lot!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey Kasper, thanks for the feedback, I did indeed realize that the zooming was unnecessary and stopped doing that in the later videos of the series. Glad you're finding it useful ☺️🙏
Далее
Куда Анджилиша снова летит???
00:16
Incredible magic 🤯✨
00:53
Просмотров 10 млн
Июль в Tanks Blitz
51:46
Просмотров 87 тыс.
Why Aren't Games Fun Anymore?
34:15
Просмотров 965 тыс.