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

Поделиться
HTML-код
  • Опубликовано: 26 сен 2024

Комментарии • 500

  • @AliElZoheiry
    @AliElZoheiry  Год назад +44

    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 11 месяцев назад +1

      When you say "update the task" - which task or do you mean create a new task for equiping it?

    • @AliElZoheiry
      @AliElZoheiry  11 месяцев назад +1

      @@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 11 месяцев назад +1

      @@AliElZoheiry 100% - thank you.

    • @tomerhertz8502
      @tomerhertz8502 9 месяцев назад

      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 9 месяцев назад

      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

  • @storeboughtrocketgames2560
    @storeboughtrocketgames2560 9 месяцев назад +31

    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  9 месяцев назад +5

      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 7 месяцев назад +1

      @@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! 🤣🏆🎉

  • @D3K5
    @D3K5 3 месяца назад +9

    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  3 месяца назад

      Wow! Thank you so much for the support Max. This means so much to me, I appreciate you 🙏😊

  • @HusmanGames
    @HusmanGames 7 месяцев назад +5

    This series I by far the best taught content I've watched on Unreal here on RUclips

    • @AliElZoheiry
      @AliElZoheiry  7 месяцев назад

      Thank you so much for your kind words! I'm glad you found the series helpful and well-taught. Appreciate your support!

  • @lorenfulghum2393
    @lorenfulghum2393 5 месяцев назад +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  5 месяцев назад +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.

  • @cursedbishstudio
    @cursedbishstudio Год назад +39

    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 11 месяцев назад

      You're absolutely right and honestly it's a really good video.

    • @AliElZoheiry
      @AliElZoheiry  5 месяцев назад +1

      I don't know how I missed this comment 7 months ago. I really appreciate the support 🙏❤️

  • @Clydiie
    @Clydiie Год назад +10

    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  Год назад +1

      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!

  • @sergimorpalou206
    @sergimorpalou206 11 месяцев назад +2

    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  11 месяцев назад

      Hey Sergi, thank you for the support, I'm very happy you found this useful ☺️🙏

  • @vidmaster7
    @vidmaster7 Год назад +6

    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  Год назад +7

      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

  • @youseiy
    @youseiy Год назад +4

    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  Год назад +3

      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 ;)

  • @youssefkhaledselem936
    @youssefkhaledselem936 2 месяца назад

    مش شايف مصريين كتير يا بشمهندس علي بس بجد أنت فخر لينا أنت من الأخر جاااااامد شكرا ليك جدااا❤❤❤❤

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад +1

      شكرًا جدًا لك! سعيد جدًا إنك استفدت من الفيديوهات 🙏

  • @HandsOnKnowledge
    @HandsOnKnowledge Год назад +5

    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  Год назад +3

      I'm very happy to hear that, you're welcome man, thank you for watching 🙏

  • @nishanthapaliya4444
    @nishanthapaliya4444 5 месяцев назад

    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  5 месяцев назад +1

      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! 🎉

  • @pwnonator
    @pwnonator Год назад +1

    This tutorial is everything i pretty much been looking for so far. Wow

    • @AliElZoheiry
      @AliElZoheiry  Год назад

      Glad it was helpful! Thank you for watching 🙏

  • @saucythighs
    @saucythighs 3 месяца назад

    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  3 месяца назад

      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! 🙏

  • @sambarr8465
    @sambarr8465 2 месяца назад

    Thanks for the tutorial series. Very clear and easy to understand.
    I got stuck for atleast a day trying to move from the "set movement speed" to the "Move along patrol route" stage.
    Watched the video over and over and couldn't figure it out, added loads of print screens and got nowhere...
    It turned out that I used a selector instead of a sequence for the patrol state... FML :D
    onto Episode 3!

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад

      Glad you found the solution at the end, sometimes some patience and trial and error is what it takes

  • @madhisaranadasa1410
    @madhisaranadasa1410 Год назад +2

    Best Unreal AI content I have seen. Amazing work!

    • @AliElZoheiry
      @AliElZoheiry  Год назад

      Thank you ❤️ really glad you found it useful

  • @leduyminh7813
    @leduyminh7813 11 месяцев назад +1

    Amazing tutorials! I've been looking for a detailed tutorial on advanced AI like this for months. Thank you so much :)

    • @AliElZoheiry
      @AliElZoheiry  11 месяцев назад

      You're very welcome! Thank you for watching and I hope you enjoy the rest 😊🙏

  • @bochandelle
    @bochandelle 2 месяца назад

    These are so good Ali, incredibly clear and explanatory. Keep 'em coming!

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад

      Thanks! I'm really happy to hear that you find the videos helpful. I'll definitely keep them coming 😉

  • @MrPlugPod
    @MrPlugPod 4 месяца назад

    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  4 месяца назад +1

      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!

  • @supa76
    @supa76 9 месяцев назад

    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  9 месяцев назад

      You're most welcome Supa, always happy that I could help ☺️🙏 thank you for watching

  • @trelaskillz
    @trelaskillz 8 месяцев назад

    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  8 месяцев назад

      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.

  • @twidiegamers3854
    @twidiegamers3854 11 месяцев назад +2

    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  11 месяцев назад +1

      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 🙏😇

  • @arthurwilliamsmukambe6014
    @arthurwilliamsmukambe6014 10 месяцев назад +6

    this episode ruined it for me bro, everything was going amazing until this episode, about 3/4ths through the video things began not working right with the enemy, after the whole sheath thing. i followed exactly and went over things three times to ensure no node is incorrectly done, i can see a LOT of others had issues here too, i went on after this video and the other videos are good but this one is the issue one, i know you've defended your edits and actions in the comments but this video seriously desrves a re-do, but go over things completely as you do them, this is the ONE video hurting this entire playlist..
    i found this video on reddit, on the UE sub there was about a dozen users who praised the tutorial but warned against part 2 of it, which i ignored because i assumed that i could figure out where they had issues, looks like it got me too, this video is mostly good but had a vital error keeping it from being as polished as your other vids, please re do it bro.

    • @BadNewsStudio
      @BadNewsStudio 10 месяцев назад +1

      DUDE yes!!!!! I found this on reddit yesterday too but not on that sub, it was from the game devs sub, u/NoFrillaz or whatever shared it but told people to skip the second video because he skipped a lot of steps later on in the vid and it messes up a lot of ppl lol I've been trying to redo things 4 times now and have the exact same issue!!!! it makes me so angry because everything else is SO good!! but darn it

    • @ong8163
      @ong8163 10 месяцев назад +1

      me too I am having trouble with it around that part , my enemy freezes and jitters when supposed to be switching, I agree I wish he can remake it, please Ali

    • @arthurwilliamsmukambe6014
      @arthurwilliamsmukambe6014 10 месяцев назад +2

      yes bro it was all good until this one, its hard to explain to him about what mine does but reading all the other comments i can see everyone that has issues with this vid, hasthe exact same issue because mine is doing same and it just make me frustrated and i've rechecked everything, please ali it won't take much effort to just redo this one, it will make ur playlist perfectly i've done the following 3 videos after this one and they all are good but the issue on this video has roots that lead and branch out to the after vids.... i've redone this tutorial 3 times now because of this issue, thinking i missed something but no, it's literally all from the sudden addition of nodes later on, even if u mentioned a few changes at the start that doesnt gloss over things, just please redo it in full and show things as you mention them!!! @@BadNewsStudio

    • @Dominicn123
      @Dominicn123 10 месяцев назад +1

      i'm having issues too, with the wield sword function part, i know he pinned a comment with a solution but that doesn't quite resolve things in full. i'm hoping for a re-do too haha, i've been stuck on this video for 4 days now

    • @AliElZoheiry
      @AliElZoheiry  10 месяцев назад +2

      Hey all, just to be clear, there is nothing wrong with the tutorial, you can follow it from start to finish without any problems. The reason I wrote this comment, and the reason you might be having issues, is that event dispatchers, and behaviour trees are a new way of working for most of you, so it can be confusing, but I assure you, the content itself is tried and tested and works perfectly, if you are having issues, feel free to join the Discord server and we have a youtube-help channel there where you can ask your question, provide details, then I or someone else can help you there. Just make sure first to check the existing questions in case you find the solution you're looking for.
      Good luck 🤞

  • @jedtanartkulprakrom4616
    @jedtanartkulprakrom4616 4 месяца назад

    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 4 месяца назад +1

      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 4 месяца назад

      Thank you so much

    • @AliElZoheiry
      @AliElZoheiry  3 месяца назад +1

      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

  • @0xJarry
    @0xJarry 11 месяцев назад

    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  11 месяцев назад

      Hahaha awesome, glad we were on the same page there

  • @pablochamarra8246
    @pablochamarra8246 5 месяцев назад

    Once again great stuff, completely devoured this tutorial. Love.

    • @AliElZoheiry
      @AliElZoheiry  5 месяцев назад

      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! 🙏

  • @oscblade1691
    @oscblade1691 5 месяцев назад

    I'm loving this tutorial series so far great work keep it up

    • @AliElZoheiry
      @AliElZoheiry  5 месяцев назад +1

      Thank you so much for the positive feedback! I'm glad to hear you're enjoying the tutorials.

  • @unsolvedbc
    @unsolvedbc 3 месяца назад

    Amazing!! As per usual, loving this series so far, thank you!

    • @AliElZoheiry
      @AliElZoheiry  3 месяца назад +1

      So happy to hear you're enjoying the series! Thank you for your support 🙏

  • @LANA-xm5fg
    @LANA-xm5fg Месяц назад

    Your way in teaching is so so so cool....i hope you do a vfx tutorial in ue5 because i am absolutly lost on it ❤❤❤❤❤❤❤❤❤❤❤❤❤❤

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад +1

      Thank you so much for the kind words! I'm glad to hear you enjoy my teaching style. 🙏❤️ Unfortunately I know nothing about making VFX, very far away from my software engineering background

  • @arturkozanowski1499
    @arturkozanowski1499 5 месяцев назад

    Man you are the one of my the best explores in this year. Really. Bow for your efforts.

    • @AliElZoheiry
      @AliElZoheiry  4 месяца назад

      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! 🙏

  • @CCCRWWE
    @CCCRWWE Год назад

    Awesome, thanks you Ali.这是我见过最好的AI教程

    • @AliElZoheiry
      @AliElZoheiry  Год назад +1

      You're welcome 🙏 I'm very happy that you enjoyed it 😊

  • @Mario543212
    @Mario543212 11 месяцев назад

    Amazing channel! I'm gonna binge-watch all your videos.

    • @AliElZoheiry
      @AliElZoheiry  11 месяцев назад

      Glad you like it that much. I appreciate your support 🙏

  • @TheFalcoGamingDK
    @TheFalcoGamingDK 8 месяцев назад

    Hey Ali! Great work with the video. Proberly the best guide in the world ngl.

    • @AliElZoheiry
      @AliElZoheiry  8 месяцев назад

      Thank you for the kind words! I'm really glad you found the video helpful. Your support means a lot!

  • @ericcrary2380
    @ericcrary2380 8 месяцев назад

    Ur series is amazing and you are very appreciated

    • @AliElZoheiry
      @AliElZoheiry  8 месяцев назад

      Thanks so much for saying that. I appreciate you too 🙏

  • @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 4 месяца назад

      @@AliElZoheiry My thought since has been how you figured out this particular logic, it is clean and also very uncommon while looking common

  • @eugeniivakulenko5281
    @eugeniivakulenko5281 6 месяцев назад

    Thank you very much sir! Your tutorials are super useful!

    • @AliElZoheiry
      @AliElZoheiry  5 месяцев назад +1

      You're very welcome! I'm glad you found the tutorials helpful. Thank you for watching and commenting 🙏

  • @gufranyesilyurt
    @gufranyesilyurt 11 месяцев назад

    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.

  • @deltacake3809
    @deltacake3809 4 месяца назад

    Great video, thats what I was looking for

    • @AliElZoheiry
      @AliElZoheiry  4 месяца назад

      Hey there! Thank you for watching and commenting! I'm glad the video was able to help you out 🙏

  • @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

  • @FPChris
    @FPChris Месяц назад

    Another great tutorial.

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад

      You're welcome! I'm glad you enjoyed it! Thanks for watching and commenting 🙏

  • @kalyanchakravarthi2005
    @kalyanchakravarthi2005 10 дней назад +1

    I have a problem with patrol system , chasing and attacking is perfect but patrol is not working properly sometimes enemy stops suddenly and the patrol happen only once he does not repeat it by getting back to same starting point . I assume that the problem is with my landscape, as I am using a desert landscape it has many up's and down's i think this might causing problem but again sometimes character travels the end point even spline is under landscape but again not returns he just wait there.

    • @AliElZoheiry
      @AliElZoheiry  6 дней назад +1

      Hey! That sounds like a tricky issue. It could definitely be related to the landscape’s elevation. Make sure to check both your spline's setup and the logic for returning to the starting point in your patrol behavior. If the spline is under the landscape, it may not trigger properly. I recommend adding some debug prints to see where the issue comes from. Hope that helps! 🙏

  • @empares
    @empares 12 дней назад +1

    I was stuck for many hours (using 5.4) that the enemy did not unsheath the sword and just stood still. The fix was to change the play rate in the first Play montage to -1. Because the animation is set to -1.

    • @AliElZoheiry
      @AliElZoheiry  6 дней назад +1

      Glad to hear you found the fix! It's always the small details that can make a big difference. Thanks for sharing that solution! 🙏

  • @erikfischer5021
    @erikfischer5021 Год назад +3

    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  Год назад +1

      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 Год назад

      THX!!!@@AliElZoheiry

    • @ericcrary2380
      @ericcrary2380 8 месяцев назад +1

      Thank U!!!! U are the best. @@AliElZoheiry

  • @clebo99
    @clebo99 4 месяца назад +1

    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  4 месяца назад +1

      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

  • @ryanjdevlin87
    @ryanjdevlin87 11 месяцев назад

    Thank your for this series this will help me alot :) thanks so much

    • @AliElZoheiry
      @AliElZoheiry  11 месяцев назад

      You're very welcome! Thank you for watching :)

  • @luckydawgs
    @luckydawgs 2 месяца назад

    Really great stuff here! I've been following along trying to do everything here but with State Trees. Would love to see some future content on handling AI with State Trees. Any chance you've got plans to tackle that topic?

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад +1

      Hey there! Thank you for the kind words and suggestion! I've actually been considering doing a series on AI with State Trees, as it's a popular request. Stay tuned!

    • @luckydawgs
      @luckydawgs 2 месяца назад

      @@AliElZoheiry Awesome! Can't wait!

  • @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 🙏

  • @kasperlarsson7598
    @kasperlarsson7598 10 месяцев назад +1

    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  10 месяцев назад +1

      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 ☺️🙏

  • @Sebbx8
    @Sebbx8 9 месяцев назад

    Excelent tutorial, you are my favorite now

    • @AliElZoheiry
      @AliElZoheiry  9 месяцев назад

      Thank you! Glad you are enjoying them 😇🙏

  • @raduvady
    @raduvady 10 месяцев назад

    really great tutorials, thank you very much

    • @AliElZoheiry
      @AliElZoheiry  10 месяцев назад

      You're very welcome! Thank you for watching

  • @huinara1974
    @huinara1974 2 месяца назад +1

    I'm asking you a question through a translator because I'm Korean, but I don't know if you can translate it accurately.
    I have two questions.
    1. When the game goes on, the character immediately pulls out the sword, puts it back in, and moves to the spline point. When the game goes on, I want the game to move right away instead of pulling the sword out and putting it back in. How do I fix this?
    (Solve: Weild Sword was applied to Beginplay.)
    2. I've never solved a non-soft animation with a character movement either, is there a way to go to the line instead of spline point?
    (solve: It was solved when I changed 'use controller rotation yaw' to false. However, if you change the function to false, the character will look in the opposite direction when you press the '2' key.
    So, in bp_enemybase, 'Set Controller Rotation Yaw' is set to true at the front of FieldSword and false at the front of SheathSword. Also, in bp_enemybase (Self), the default value of 'Set Controller Rotation Yaw' is set to false.
    Through this method, the original value works as false, true when the knife is taken out, and false again when the knife is moved.
    I don't know if this is the right method, so if you have a problem like me, please try this method and verify it.)
    +
    If the next motion does not occur after drawing the sword, check 'Call On Field Sword' is connected to On Completed in 'Wield Sword'.
    It took me an hour to find the problem..😂
    I've found a solution, but I won't erase it to present a solution to someone with a problem like me.

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад +2

      Thank you for your detailed explanation and providing solutions to your own questions! It's great that you've found a method that works for you. Your willingness to share your process to help others is really admirable. Keep up the problem-solving spirit!

  • @zippyps5
    @zippyps5 5 месяцев назад

    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  5 месяцев назад

      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!

  • @thebestcomment7671
    @thebestcomment7671 Месяц назад +1

    I just have a question, I want to have a box that spawns the monster when the player collides with it, but when I do that and spawn the monster, it doesn’t have a patrol route selected and I don’t know how to make it come with a patrol route already set. Btw I am spawning a new ai and setting it to the enemy when the box collision happens, it does everything except follow the patrol route if that helps.

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад +1

      Hey there! In order to have the monster spawn with a pre-set patrol route, after spawning it, you will have a reference to the spawned character. Then you can just get the PatrolRoute variable from that reference and set it's value to be the reference of the patrolRoute from your level (you will have to get a reference to that patrol route first though, and how to get that reference will depend on how you built your game)

    • @thebestcomment7671
      @thebestcomment7671 Месяц назад

      @@AliElZoheiry thank you so much

  • @deltacake3809
    @deltacake3809 4 месяца назад +1

    OMG, I rewatched the video three times now because some things weren't working correctly and every time I forgot to set the succeed boolean to true in the finish execute note...

    • @AliElZoheiry
      @AliElZoheiry  4 месяца назад

      Hey there! It happens to the best of us 😉 Glad you figured it out in the end!

  • @TrackstarOP
    @TrackstarOP 8 месяцев назад

    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  8 месяцев назад +1

      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 8 месяцев назад

      @@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  8 месяцев назад

      My pleasure ​@@TrackstarOPhappy to help where I can 🙏

  • @theindiegamedude
    @theindiegamedude Год назад +1

    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  Год назад +1

      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 Год назад

      @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 10 месяцев назад

      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 10 месяцев назад

      @@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.

  • @ahmetozan4754
    @ahmetozan4754 10 месяцев назад

    thank you for your efforts brother. my main language is not english. Selam in Turkey. I solved my problem. Press " 1 " not moving npc. Solution in " BT_Enemy_Base " > BTT_SetMovementSpeed > Movement Speed (in right) > Spritting. Not Idle :) I hope it was helpful :)

    • @AliElZoheiry
      @AliElZoheiry  10 месяцев назад

      Hey Ahmet, glad you fixed the issue, well done 💪

  • @heavenseek
    @heavenseek Год назад +4

    In part 1 we built the "BP_Enemy_Base" code (pt 1: 37:00 - 41:07). But it looks like that code got replaced by completely new code, of unknown origin, appearing here in this Part 2 at 8:16.
    I've spent a week on this tutorial. I've redone this and part 1 a few times now, and I can't get it working. Here's how mine works:
    Press "1" the first time: Enemy just stops patrolling and stares at me.
    Press "1" twice: Enemy slides along his patrol zone and continually unsheaths
    Press "1" third time: Enemy slides, then finally runs and attacks me.
    Press "1" fourth time: Enemy sheaths a few times and returns to his Patrol Path; the sword never disappears.
    After tearing out most of my hair, I gave up and downloaded the project zip. When I open that project and play, the Enemy AI faces me, unsheathes, and then runs behind a wall, faces the wrong way, and swings at empty space a few times.
    Is there a way to get a project download at the point where the action makes sense at the end-point of this video?

    • @AliElZoheiry
      @AliElZoheiry  Год назад +1

      Hey Heavenseek, so the enemy blueprint was not completely replaced with something else, as mentioned at 1:14, I just changed the WieldSword event and behavior tree task to include an animation and an event dispatcher, which I proceed to explain at 38:20. It sounds like your problem is likely with the wield sword event and behavior tree task, make sure that in the WieldSword event you dispatch OnWieldSword and in your task you bind to this event dispatcher and only call Finish Execute then, just like we did for the unwield task at 43:55

    • @heavenseek
      @heavenseek Год назад

      @@AliElZoheiry Thanks, I'll search for those and try to fix.....

    • @AliElZoheiry
      @AliElZoheiry  Год назад +3

      @@heavenseek Hey man, I found a bug in the engine that might be causing your issue. It happened to me today when I restarted the engine, I found that the Blackboard keys on the "BTT_MoveToIdealRange" in the tree got reset and I had to manually select them again. Meaning that I had to Change the "IdealRadius to be either the AttackRadius or the DefendRadius (depending on whether I'm attacking or strafing) and the AttackTarget set it to AttackTarget as well. Hope this helps

    • @heavenseek
      @heavenseek Год назад

      @@AliElZoheiry Thanks very much, I will definitely check that out! 🙏

    • @vidmaster7
      @vidmaster7 Год назад +1

      This is exactly what is happening to me. I followed the directions exactly and have gone back through them several times. I can't see where the discrepancy is. I'll take a look at Ali's suggestions here.

  • @god_ozai828
    @god_ozai828 6 месяцев назад +1

    This is probably a specific problem I had but an easy fix anyway, my set focus wasn't working so the AI didn't focus on the player before drawing the sword, then I found out that I set the AI rotation settings to Orient Rotation to Movement instead of Used Controller desired Rotation.

    • @AliElZoheiry
      @AliElZoheiry  5 месяцев назад

      Glad to hear you found the solution! It's often the specific details that can make all the difference in debugging. Keep up the good work!

  • @daliendaan
    @daliendaan 17 дней назад

    Im pretty new to this whole UE world but at 32:32 where you cast to the AIController couldn’t you just add the AIC as a Component in the Components Menu to gain access to all its variables and stuff?

    • @AliElZoheiry
      @AliElZoheiry  16 дней назад +1

      Hey! Indeed that is of course possible, but this is just part 2 of the series, things get a lot more complex as it goes on. This is only done to ease people into the topic

  • @Amine3DArt-vp3qg
    @Amine3DArt-vp3qg 27 дней назад +1

    Hey Ali, I'm having a problem with patrolroute, can't increment in the task. Tried everything it just doesn't give me the node increment!

    • @AliElZoheiry
      @AliElZoheiry  25 дней назад +1

      Hey! if you don't see the increment function, then you are probably trying to call it on the wrong actor reference, make sure you have the right reference to the BP_PatrolRoute to call the function on it

    • @Amine3DArt-vp3qg
      @Amine3DArt-vp3qg 25 дней назад

      @@AliElZoheiry Thanks man, solved it!

    • @denberz711
      @denberz711 20 дней назад

      @@Amine3DArt-vp3qg how

  • @warehousevirtuals
    @warehousevirtuals Год назад

    I liked and subbed with all 3 of my accounts, i will be teaching these concept to my friends, thank you

    • @AliElZoheiry
      @AliElZoheiry  Год назад +1

      Thank you for the support 🙏 really glad you find it useful

  • @callatogames
    @callatogames 3 месяца назад

    Great Tutorial, thanks man :)

    • @AliElZoheiry
      @AliElZoheiry  3 месяца назад

      You're very welcome! I'm glad you found it helpful 🙏

  • @h9rr9r_80
    @h9rr9r_80 9 месяцев назад

    This tutorial is great thank you

    • @AliElZoheiry
      @AliElZoheiry  9 месяцев назад

      You're very welcome! Thank you for watching 🙏🙂

  • @gourabkundu7365
    @gourabkundu7365 Месяц назад

    I am trying to apply Walk Patroling to my Enemy, but instead of only Walking, some points Enemy is Walking and some points Enemy is Running, Its doing both. Any suggestion.

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад

      Hey! If you're points are not evenly spaced out, then the enemy might be accelerating faster and slower depending on your acceleration speed and ground friction and deceleration settings in the character movement component. These all affect how fast your enemy moves

  • @iamabot12
    @iamabot12 4 дня назад

    Hey, thanks for the tutorial, everything is working fine now. However, i faced 2 problems and i want to share them in case anyone is facing the same issue.
    Problem-1. The BTT_WieldSword function in the behavior tree was running endlessly and sword was not being equipped. I rewatched the video again to find the solution.
    Solution : The notify name on the animation montage should be same as the switch on name function in BP_Enemy_Base.
    Problem-2: The SheathSword function was not working properly.
    Solution : I forgot to do one step. I had to go into BTT_SheathSword function and from the as BP enemy base drag out a node and search for bind event on sheath sword, this will automatically create a custom event for you as shown in the video. And connect your custom event to finish execute. You have to do this for both sheat sword and wields word functionality.

  • @newtforgegames
    @newtforgegames Год назад +1

    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 :)

  • @perrobravomx4206
    @perrobravomx4206 Год назад

    Awesome video! thank you so much again for your incredible capacity to explain things. 10/10 would recommend.

    • @AliElZoheiry
      @AliElZoheiry  Год назад +1

      You're very welcome, I'm glad you found it useful, and I appreciate your support 🙏☺️

  • @shapphire9915
    @shapphire9915 13 дней назад

    I'm using ue5.4 and i have an issue where when i hit the 1 key it will not switch over to attack state. After an hour i tested my keys using a string to call hello and that was not working either. Can someone tell me whats going on with my keys?

    • @AliElZoheiry
      @AliElZoheiry  12 дней назад

      Hey, no idea honestly, if you're print string on key press didn't work, then it sounds like you got a problem with your engine itself, because there's nothing specific to get input keys to work. just double check your setting the right key and try different ones. also restart the engine or install a different version

  • @gourabkundu7365
    @gourabkundu7365 Месяц назад

    My Enemy is Patroling only 1st point of the spline after reach that point Enemy starts idleing and not patroling anymore. I cant understand what am I missing.

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад

      Hey, thank you for sharing your issue! It sounds like you are not incrementing the patrol Index correctly. so double check that part of the video

  • @BROCKSGAMING
    @BROCKSGAMING 9 месяцев назад

    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  9 месяцев назад

      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 9 месяцев назад

      @@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

  • @EGUADOGAMEPLAY
    @EGUADOGAMEPLAY 2 месяца назад

    I followed the steps, but right at the beginning, when the simple test is performed to follow the path, mine stops right at the starting point and doesn't move forward.

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад

      Sounds like you're not incrementing the pathIndex correctly

  • @electronicinfection
    @electronicinfection 4 месяца назад

    Thanks a thousand times!

    • @AliElZoheiry
      @AliElZoheiry  4 месяца назад

      You're very welcome! I'm thrilled to hear that you found the content helpful. Thanks for the feedback! 🙏

  • @tr.acc4289
    @tr.acc4289 3 месяца назад

    45:58 When I press 1, the enemy just runs towards me and uses the Sword_slash montage, but the montage_Sheath_Sword and montage_Unsheath_sword animations don't work, even the BP_sword sword doesn't appear, I checked and followed everyone's comments but still not successful, is there any way, please help me

    • @AliElZoheiry
      @AliElZoheiry  3 месяца назад

      1. Make sure that you are connecting the skeletal mesh to the montage
      2. Make sure there is no typo in the montage notify name
      3. Make sure you are using a Montage notify and not a regular notify in your montage asset
      4. Make sure you pulling the switch off of "Notify Begin" pin in your play montage node

  • @hype._.
    @hype._. 5 месяцев назад

    9:36 Use interface instead of casting
    (because the 'increment patrol route' function will apply to all types)

    • @hype._.
      @hype._. 5 месяцев назад

      Thank you very much😲

    • @AliElZoheiry
      @AliElZoheiry  5 месяцев назад

      Thank you for the suggestion! I appreciate your input on using interfaces for a more versatile solution.

    • @hype._.
      @hype._. 3 месяца назад

      8:38 (in Scene)

  • @leonfomin9250
    @leonfomin9250 3 месяца назад

    Hello Great Tutorial,
    I had a problem where i couldnt change the movement speed for the enemy player. It really took me a long time to find my problem:
    at 19:35 he added the "max walk speed",
    i mistakenly added "max movement speed".
    cheers

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад

      Hey, thanks for your comment! I'm glad you enjoyed the tutorial and identified the issue with the movement speed. It's great to hear that you were able to troubleshoot and solve the problem. Happy coding! 🙌

  • @ng5523q
    @ng5523q 12 дней назад

    Hi Ali! Your tutorials are awesome and really help me, but I have a problem when the enemy puts away his sword, he starts doing it endlessly. I did everything right. I redid it a few times, but nothing changed.

    • @AliElZoheiry
      @AliElZoheiry  12 дней назад

      Hey! Thank you for your kind words 🙏 Regarding the issue with the enemy endlessly putting away the sword, it sounds like you are ending the task before the Sword is actually put away, so double check the montage notify spelling, and that the switch statement coming out of the play montage node is coming from "OnNotifyBegin" and also check that you're correctly binding to the sheath sword event in the behaviour tree task correctly

    • @ng5523q
      @ng5523q 11 дней назад

      ​@@AliElZoheirythank you very much for your answer , the problem was in the Switch on Name, the name was different from the name in anim montage)

  • @dfaulkner1986
    @dfaulkner1986 3 месяца назад

    Followed this almost 100% and tried to use the instruction on sheath sword to also create and unsheath and it just gets stuck in the behaviour tree in the first branch of the wield sword line...

    • @AliElZoheiry
      @AliElZoheiry  3 месяца назад

      Common mistakes are:
      - Typo in the montage notify name (either in the montage or the switch statement off of the play montage node)
      - You used the wrong type of notify (regular notify instead of montage notify will not work)
      - You are not pulling off of the NotifyBegin in your play montage node (before the switch statement)
      - You are not binding correctly to the event dispatcher

  • @KittehBit
    @KittehBit 7 месяцев назад

    These videos are really good :)

    • @AliElZoheiry
      @AliElZoheiry  7 месяцев назад

      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!

  • @teaguewilson7372
    @teaguewilson7372 5 месяцев назад

    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  5 месяцев назад

      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 5 месяцев назад

      @@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)

  • @agustintoselli
    @agustintoselli Месяц назад

    Hi Ali, amazing video as usual, always top tier videos, thanks for your knowledge!!
    Quick question: i implemented a patrol route for one of my maps, and i spawn allies who will travel through it regularly (moba style). They should go from index 0 to last index, BUT all get assigned the same single patrol route and the patrol index number keeps changing each time i spawn one, so they do not follow 0 -> 1 -> 2 - > ... last index.
    Is there any way to have them kind of have their own instance of the same patrol route?
    Thanks in advance and please keep up all the amazing work you do !

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад +1

      Hey there! Thank you for your kind words and for reaching out. This tutorial assumes one patrol route per enemy, not multiple enemies following the same route. The main difference is that the PatrolIndex (which we increment when the enemy moves to the next point) is stored on the BP_PatrolRoute itself, therfore multiple enemies can't share it, because when one moves, the index increments and the other enemy will also read that same variable and move to the same point as the first enemy.
      To have the patrol route support multiple enemies, you need each enemy to store their own PatrolIndex route, and increment their own copy of that variable

  • @nholmes
    @nholmes 7 месяцев назад

    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  7 месяцев назад +1

      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!

  • @aimanzuhairi5774
    @aimanzuhairi5774 5 месяцев назад

    i have a problem where the enemy not chase me after i pressed 1, then, when i disconnect the patrolling sequence, the enemy not moving at all

    • @AliElZoheiry
      @AliElZoheiry  4 месяца назад

      Hey there, sorry to hear you're having issues. I suggest debugging the behavior tree to see what node is executing when you press "1" (by looking at the tree while the game is running)

    • @aimanzuhairi5774
      @aimanzuhairi5774 4 месяца назад

      @@AliElZoheiry i have found the issue and have fix it. Thank you sir. Love your tutorial and hope I can learn more from you

  • @samo4209
    @samo4209 2 месяца назад +1

    the switching states is not working what could be the problem

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад +1

      Hey, it could be anything really, you need to do a bit more debugging to narrow down the problem area

    • @humannormal-wg2ii
      @humannormal-wg2ii Месяц назад

      If you still need help you might just need to check inverse condition on BTD_HasPatrolRoute in the Behavior tree but, that's only if your issue was the passive not working

  • @ragnorucca6637
    @ragnorucca6637 3 месяца назад

    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 3 месяца назад

      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  3 месяца назад

      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

  • @KalashJain-l4w
    @KalashJain-l4w 2 месяца назад

    is there any way like without having pressed 1 the enemy goes patrolling and then when in range attacks the player cause in the video 1 is being pressed to change states of enemy is there any other way round ?

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад

      Indeed, that is what i do in the rest of the series. Keep watching ;)

    • @KalashJain-l4w
      @KalashJain-l4w 2 месяца назад

      @@AliElZoheiry Sure and great series will love to watch more from your channel

  • @jarofpickles1246
    @jarofpickles1246 Год назад

    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  Год назад

      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

  • @ziggiboy101
    @ziggiboy101 Месяц назад

    Anyone else having issues with "get spline point as world position" at 12:49? I can't get that.
    Edit. NVM After UE5 Crashing it had not saved the function in BP_PatrolRoute

    • @AliElZoheiry
      @AliElZoheiry  Месяц назад

      Hey! Glad to hear you figured it out. Crashes can be frustrating. If you encounter any other issues, feel free to ask! 🙏

  • @kristopherjones5991
    @kristopherjones5991 3 месяца назад

    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  3 месяца назад

      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

  • @Hunt4Glory
    @Hunt4Glory 2 месяца назад

    my character seems to be floating and not performing any animation as it moves. How do i fix that?

    • @AliElZoheiry
      @AliElZoheiry  2 месяца назад

      No idea, it could be anything really. You'll need to debug further to narrow down the problem area

  • @PokeGameTCG-Oficial
    @PokeGameTCG-Oficial 4 месяца назад

    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  3 месяца назад

      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

  • @denberz711
    @denberz711 19 дней назад

    im very new to UE5. Increment control route doesn't exist for me when trying to pull off from patrol route. Not sure why :(

    • @AliElZoheiry
      @AliElZoheiry  16 дней назад

      Hey! It sounds like you might be looking in the wrong spot. Make sure you are trying to call the function on the correct actor. If it doesn't exist it means you are pulling off of a wrong actor type

    • @denberz711
      @denberz711 10 дней назад

      @@AliElZoheiry ok I'll check it out, thanks. Also by chance could I get your discord? It'd be easier to send an image of what's happening...

  • @Depreska
    @Depreska Месяц назад

    Thank you, your tutorials are amazing! But unfortunately I can't solve the problem in one place - In the behavior tree the logic always gets stuck after BTT_Wield_Sword or (when pressing "1" again) BTT_SheathSword. Could you please tell me where I could have made a mistake?

    • @camillemjx9674
      @camillemjx9674 29 дней назад +1

      You know what, I was having exactly the same issue and I found the solution : You need to follow exactly the same process that you did for "BTTSheathSword" task, meaning bind the Event to On Wield Sword at the end before Finishing execute :) (referenced step for the Sheaf in min 49:24 of the tutorial)

    • @Depreska
      @Depreska 29 дней назад

      @@camillemjx9674 Thank you for your reply! But if you're talking about the 44:20 moment, I've already done it in both BTT and got just that, the character picks up the weapon and just stares at me. ( Or when I press 1 again, he hides it and stands there).

    • @AliElZoheiry
      @AliElZoheiry  29 дней назад +1

      Hey Depreska, if the task itself get's stuck (meaning that it get's activated and never ends) this means that you aren't calling "Finish execute" with success = true in your behavior tree task.
      Either that, or you're montage notifies aren't being called when playing your wield/sheath montage animations. Make sure that you connected the Switch node in the montage from "OnNotifyBegin" and not off of any other pin, and also make sure that your notifies are named correctly in your montage and don't have any typos

    • @Depreska
      @Depreska 29 дней назад

      @@AliElZoheiry Thank you!
      Unfortunately, I was just inattentive, and did not connect the Call On Wield/Sheath pins in BP_Enemy correctly, instead of “On Completed” I connected it to the topmost one. >_< Time to start learning during the day instead of at night.
      ('''')(^_^)('''') Thanks again!

  • @shivc03
    @shivc03 5 месяцев назад

    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  5 месяцев назад

      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)

  • @Redvil01
    @Redvil01 3 месяца назад

    Noob question. How do you enable the search bar in the context menu? I don't have it by default.

  • @tomashorsky3316
    @tomashorsky3316 8 месяцев назад

    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  8 месяцев назад +1

      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

  • @showcast4371
    @showcast4371 4 месяца назад

    @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  4 месяца назад

      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 4 месяца назад

      @AliElZoheiry thanks i got it how to fix it. Btw Amazing work👍🏻👍🏻🔥🔥

  • @headkick7208
    @headkick7208 5 месяцев назад

    I cant get the keyboardevent 1 key to work. i have gone over everything you have done for 1 hour and its all the same? yet i cant do it? any help please

    • @AliElZoheiry
      @AliElZoheiry  4 месяца назад

      Hey there! I'm sorry to hear you're running into issues. I'd suggest that you check the keybindings in the project settings. You can navigate to Project Settings > Engine > Gameplay Debugger > Input to ensure that the keybindings are correctly set to the desired keys.

  • @twitchtutkunu576
    @twitchtutkunu576 19 дней назад

    I trusted you my friend

    • @AliElZoheiry
      @AliElZoheiry  16 дней назад

      Thanks, I really appreciate it. 🤝