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 Жыл бұрын
When you say "update the task" - which task or do you mean create a new task for equiping it?
@AliElZoheiry Жыл бұрын
@@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 Жыл бұрын
@@AliElZoheiry 100% - thank you.
@tomerhertz8502 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 🙏🙏
@nholmes10 ай бұрын
@@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! 🤣🏆🎉
@D3K56 ай бұрын
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!
@AliElZoheiry6 ай бұрын
Wow! Thank you so much for the support Max. This means so much to me, I appreciate you 🙏😊
@anshumandash605318 күн бұрын
My favorite Unreal tutorial series! I love how you make everything in the "best" way possible - I don't always get why you're doing what you are doing, but after thinking about it for a while, and watching your videos on components and event dispatchers, I love that you show the most scalable way to design a game. I am now using best practices without even thinking about it, all thanks to you!
@AliElZoheiry14 күн бұрын
Hey! Thank you so much for your kind words. I’m really glad to hear that you’re finding my tutorials helpful and that you're picking up on best practices. Your support means a lot! 🙏
@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 Жыл бұрын
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
@HusmanGames10 ай бұрын
This series I by far the best taught content I've watched on Unreal here on KZbin
@AliElZoheiry10 ай бұрын
Thank you so much for your kind words! I'm glad you found the series helpful and well-taught. Appreciate your support!
@CM-cs3sy5 ай бұрын
The thing I love about your videos, is that I can actually absorb the information without have to race the instructor that goes on to do a millions things before you complete what you are doing and understand it... spacing in videos like this is SOOOO important.
@AliElZoheiry5 ай бұрын
Thank you so much for your kind words! I'm really glad to hear that you find the pacing of my videos helpful for absorbing the information. I'll definitely keep that in mind for future tutorials.
@cursedbishstudio Жыл бұрын
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 Жыл бұрын
You're absolutely right and honestly it's a really good video.
@AliElZoheiry8 ай бұрын
I don't know how I missed this comment 7 months ago. I really appreciate the support 🙏❤️
@youssefkhaledselem9365 ай бұрын
مش شايف مصريين كتير يا بشمهندس علي بس بجد أنت فخر لينا أنت من الأخر جاااااامد شكرا ليك جدااا❤❤❤❤
@AliElZoheiry5 ай бұрын
شكرًا جدًا لك! سعيد جدًا إنك استفدت من الفيديوهات 🙏
@jbtnproductions72458 ай бұрын
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
@AliElZoheiry8 ай бұрын
Obrigado! Estou muito feliz que você está achando útil, a sua mensagem me motiva muito. Muito obrigado pelo seu apoio!
@sergimorpalou206 Жыл бұрын
very well explained, without having much idea of English I understood everything! For the following videos, thank you very much! greetings from BCN
@AliElZoheiry Жыл бұрын
Hey Sergi, thank you for the support, I'm very happy you found this useful ☺️🙏
@lorenfulghum23938 ай бұрын
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.
@AliElZoheiry8 ай бұрын
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.
@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 Жыл бұрын
Really happy I could help you Gameboy, I appreciate the support, and looking forward to teaching you more.
@Clydiie Жыл бұрын
@Ali Elzoheiry I'm currently watching and following part 3, and I'll be very excited to see what you do next!
@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 Жыл бұрын
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 ;)
@rashidfarhan62232 ай бұрын
as a unity refugee i am absolutely loving this series so far
@AliElZoheiry2 ай бұрын
Hey! I'm glad to hear you're enjoying the series! Welcome aboard 🙏
@MrPlugPod7 ай бұрын
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 :)
@AliElZoheiry7 ай бұрын
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!
@kingswood812 ай бұрын
For anyone having issues with the enemy not unsheathing the sword correctly, or sliding all over the place, the fix for me was in BP_Enemy_Base. I had "Call on Wield Sword" connected to the top right hand pin of the associated Play Montage, when it should have been connected to the "On Completed" pin. Same issue with the "Call on Sheath Sword". I also had an issue with the enemy walking the Patrol Route. My issue was that some of the spline points were below ground level. Check each spline point in the Patrol Route and ensure the Z axis value for Location (the blue one I think) under the "Selected Points" section of the Details panel is set to "0".
@AliElZoheiryАй бұрын
Thank you for sharing this fix! Those details about connecting the pins and checking the spline points are definitely helpful for others who might encounter the same issues. 🙏
@madhisaranadasa1410 Жыл бұрын
Best Unreal AI content I have seen. Amazing work!
@AliElZoheiry Жыл бұрын
Thank you ❤️ really glad you found it useful
@frenzyayushmanАй бұрын
EZRA YOU ARE THE BEST UE5 TEACHER!
@AliElZoheiryАй бұрын
Thank you so much for your kind words! I appreciate your support 🙏 You're the 4th person to think I look like Ezra btw. Love it
@pwnonator Жыл бұрын
This tutorial is everything i pretty much been looking for so far. Wow
@AliElZoheiry Жыл бұрын
Glad it was helpful! Thank you for watching 🙏
@erikfischer5021 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
THX!!!@@AliElZoheiry
@ericcrary238011 ай бұрын
Thank U!!!! U are the best. @@AliElZoheiry
@subzerosabaАй бұрын
@@AliElZoheiry you are the best!
@leduyminh7813 Жыл бұрын
Amazing tutorials! I've been looking for a detailed tutorial on advanced AI like this for months. Thank you so much :)
@AliElZoheiry Жыл бұрын
You're very welcome! Thank you for watching and I hope you enjoy the rest 😊🙏
@trelaskillz11 ай бұрын
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!
@AliElZoheiry11 ай бұрын
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 Жыл бұрын
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 Жыл бұрын
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 🙏😇
@sambarr84655 ай бұрын
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!
@AliElZoheiry5 ай бұрын
Glad you found the solution at the end, sometimes some patience and trial and error is what it takes
@HandsOnKnowledge Жыл бұрын
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 Жыл бұрын
I'm very happy to hear that, you're welcome man, thank you for watching 🙏
@supa76 Жыл бұрын
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 Жыл бұрын
You're most welcome Supa, always happy that I could help ☺️🙏 thank you for watching
@btdarmstad581529 күн бұрын
For the WieldSword and SheathSword events, after adding "Bind Event to" nodes and custom "Finish" events, the AI would stop working on the first button click on each action (once for the wield, and once for the sheath), but work fine afterwards. Reintroducing a tiny delay on both the SheathSword and WieldSword events in BP_Enemy_Base solved it for now. I am not using any play montage for these two actions at this time.
@AliElZoheiry22 күн бұрын
Hey, adding a delay to solve it usually means that you have an issue with the flow of execution, so either you are not binding to the event correctly, or you are binding at the wrong time (e.g binding after the event has fired, which won't do anything) or you are not firing the event at the correct time, so check those things
@btdarmstad581522 күн бұрын
@@AliElZoheiry Ah, I see. Looks like putting the Bind Event to X node before calling the events in the respective BTT seems to work without the delay nodes in the BP_Enemy_Base 😁
@saucythighs6 ай бұрын
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.
@AliElZoheiry6 ай бұрын
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! 🙏
@bochandelle5 ай бұрын
These are so good Ali, incredibly clear and explanatory. Keep 'em coming!
@AliElZoheiry5 ай бұрын
Thanks! I'm really happy to hear that you find the videos helpful. I'll definitely keep them coming 😉
@GrumpyGillsFishing2 ай бұрын
This is a really informative course. Thanks for the work you put into teaching all of us. I got hung up for a while because I was setting the index instead of the direction as 1 or -1 lol. Took me a while but I eventually figured out the issue.
@AliElZoheiry2 ай бұрын
Hey! I'm glad you found the course informative! 😄 No worries about getting hung up; it happens to the best of us. Thanks for sharing your experience, and I'm happy you figured it out! 🙏
@nishanthapaliya44448 ай бұрын
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 🎉
@AliElZoheiry8 ай бұрын
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! 🎉
@huinara19745 ай бұрын
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.
@AliElZoheiry5 ай бұрын
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!
@Amine3DArt-vp3qg3 ай бұрын
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!
@AliElZoheiry3 ай бұрын
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-vp3qg3 ай бұрын
@@AliElZoheiry Thanks man, solved it!
@denberz7113 ай бұрын
@@Amine3DArt-vp3qg how
@A.Dennis.A2 ай бұрын
Keep in mind if you're not using animations for sheathing and unsheathing the sword and the AI don't actually goes back to patrolling at 45min, that's most likely due to the nodes firing off to fast in the SheathSword event, this could be solved by putting a delay right before the "Call On Sheath Sword" Event dispatcher giving it a little bit of time to catch up.
@AliElZoheiry2 ай бұрын
Thank you insights! If you are not using animations, then I would definitely suggest a different method other than event dispatchers, because the main reason the dispatcher is there, is so that the behavior tree task can wait until the animation ends before finishing the task.
@hype._.8 ай бұрын
9:36 Use interface instead of casting (because the 'increment patrol route' function will apply to all types)
@hype._.8 ай бұрын
Thank you very much😲
@AliElZoheiry8 ай бұрын
Thank you for the suggestion! I appreciate your input on using interfaces for a more versatile solution.
@hype._.6 ай бұрын
8:38 (in Scene)
@thebestcomment76714 ай бұрын
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.
@AliElZoheiry4 ай бұрын
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)
@thebestcomment76714 ай бұрын
@@AliElZoheiry thank you so much
@oscblade16918 ай бұрын
I'm loving this tutorial series so far great work keep it up
@AliElZoheiry8 ай бұрын
Thank you so much for the positive feedback! I'm glad to hear you're enjoying the tutorials.
@kondwaninyirongo86772 ай бұрын
Hi, great series but my AI is not following the spline even after following all the steps. At 14:33 where you're testing the patrol behaviour, mine is just idle. No movement. Please help
@kondwaninyirongo86772 ай бұрын
Nevermind😅 it finally worked!
@cynty0112 ай бұрын
Howww, can you help me plz
@kondwaninyirongo86772 ай бұрын
@@cynty011 what version are you using?
@cynty0112 ай бұрын
5.4.4. Can you help me
@heavenseek Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@AliElZoheiry Thanks, I'll search for those and try to fix.....
@AliElZoheiry Жыл бұрын
@@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 Жыл бұрын
@@AliElZoheiry Thanks very much, I will definitely check that out! 🙏
@vidmaster7 Жыл бұрын
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.
@daliendaan3 ай бұрын
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?
@AliElZoheiry3 ай бұрын
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
@TJ_The_Dev2 ай бұрын
After AI see me it equip weapon and stay in this sequence for ever. Behaviour three looks same like yours in 48:08 , equip weapon work, event dispatcher fired correctly but after equip he don't go the chase state. Any idea?
@AliElZoheiry2 ай бұрын
Hey there, sounds like the task isn't ending correctly, double check your notify names in the montage and the event Dispatchers and listeners, also make sure that finish execute in the behaviour tree task has the "success" box ticked
@clebo997 ай бұрын
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.
@AliElZoheiry7 ай бұрын
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
@arturkozanowski14998 ай бұрын
Man you are the one of my the best explores in this year. Really. Bow for your efforts.
@AliElZoheiry7 ай бұрын
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! 🙏
@chillax1629Ай бұрын
Awesome content, it is clear and very understandable for me. I can tell you know very well what your are doing and how to use Unreal Engine. Thanks for sharing your outstanding knowledge!
@AliElZoheiry22 күн бұрын
Thank you so much for your kind words! I'm glad to hear you find the content clear and understandable. I appreciate your support 🙏
@kalyanchakravarthi20053 ай бұрын
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.
@AliElZoheiry3 ай бұрын
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! 🙏
@gufranyesilyurt Жыл бұрын
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.
@0xJarry Жыл бұрын
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 Жыл бұрын
Hahaha awesome, glad we were on the same page there
@RahilOmar-m6x2 ай бұрын
hello great tutorial! just a quick question how did you get the unsheathing sword animation as I can't find any on mixiamo. I can only find the sheathing sword.
@AliElZoheiryАй бұрын
Hey! Glad to hear you enjoyed the tutorial! 🙏 For the unsheathing sword animation, I explained it in the video as well, that it's just the sheath animation but played backwards
@RahilOmar-m6xАй бұрын
@@AliElZoheiry ahhh I see gotta learn to watch the video a bit more when I encounter an issur
@pablochamarra82468 ай бұрын
Once again great stuff, completely devoured this tutorial. Love.
@AliElZoheiry8 ай бұрын
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! 🙏
@Rugged-Ranger119-vn9om7 ай бұрын
I dont know if its a problem with what i did but as soon as i create the attack fuction at 31:32, the enemy stops attacking completely and even when i just connect the attack functions to the behavior tree, it doesn't do anything, just spawns the sword and keeps standing like a statue 😕 Help me please
@Rugged-Ranger119-vn9om7 ай бұрын
Also the enemy ai attacks only if i don't do the step at 31:21 where we set the value for the attack target, and for the switch function, it is always passive no matter what i do 😕
@lambe1porco7 ай бұрын
Hey, I'm having similar issues. I fixed about 50% of my troubles by having only one AI in the map. This way I'm able to use the function "SetStateAsAttacking" but I still need to plug the "GetPlayerCharacter" instead of the "AttackTarget" input. Of course despite things being better, I still will want to have more than 1 AI at the same time. Will try to keep finding a solution...
@Rugged-Ranger119-vn9om7 ай бұрын
@@lambe1porco i tried with the get player character node as the attack target but still the attack function doesn't even work, it works only if i plug in the task directly
@lambe1porco7 ай бұрын
@@Rugged-Ranger119-vn9om Without seeing all your blueprints, idk what can be wrong. Here's my "SetStateAsAttacking" function in the AI controller (i.postimg.cc/52TSRjzw/imagem-2024-05-12-224919722.png). Regarding the more than 1 AI issue, I found that I had to use a "GetAllActorsOfClass" insted of the "GetActorOfClass" and also switch the flip/flop to 2 keyboard events, one for each state. I believe when I get the AI perception working, this will be all good
@AliElZoheiry7 ай бұрын
Hey there, I'm really glad to see people answering each other in the comments. I hope you managed to fix your issue. If you haven't, I unfortunately can't tell what the issue is from that description alone, but I recommend opening up the behavior tree while the game is running to see where it stops, and also add breakpoints to follow the execution of your code and see where it stops
@jedtanartkulprakrom46167 ай бұрын
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]
@DaviesMurphy6 ай бұрын
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...
@jedtanartkulprakrom46166 ай бұрын
Thank you so much
@AliElZoheiry6 ай бұрын
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
@mikekaly9923 күн бұрын
Thank you so much for the series this is amazing work! I am having a problem when I follow your steps at 30:00. I noticed that when I made the switching between states for my enemy his movement speed stays at sprinting while following the route even if my speed is set to walking. However, under patrol sequence if i swap the MoveAlongPatrolRoute with SetMovementSpeed then the enemy walks normally and attacks while sprinting as desired. But if I keep it as you showed somehow it doesn't walk while on patrol he only sprints between points. I am stuck for days and I cannot seem to find the issue and I literally follow the same steps as you took. Any ideas as to what may have gone wrong?
@AliElZoheiry20 күн бұрын
Hey! I'm not really sure I understand the problem, but if the movement behavior of your character is different than mine, then it is likely the default settings of the charactermovement component that comes with the BP_ThirdPersonCharacter in this template. If you are not using the same character, then it's likely the settings of the character movement will be different
@mikekaly9920 күн бұрын
@@AliElZoheiry Sorry that was indeed confusing. 😅 Basically when my character is patrolling, the animation of the character is like it is running but on a walking speed. From what I understand the animation is constantly on running animation no matter the speed of the enemy. However if i set my enemy in the world without using him with the behaviour tree and set him to just walk towards me on a fixed speed, the animation will work between running and walking. But not when the enemy is possessed under the behaviour tree. I hope that makes more sense
@unsolvedbc6 ай бұрын
Amazing!! As per usual, loving this series so far, thank you!
@AliElZoheiry6 ай бұрын
So happy to hear you're enjoying the series! Thank you for your support 🙏
@Mario543212 Жыл бұрын
Amazing channel! I'm gonna binge-watch all your videos.
@AliElZoheiry Жыл бұрын
Glad you like it that much. I appreciate your support 🙏
@JoelLandberg28 күн бұрын
Your tutorials are brilliant!!
@AliElZoheiry22 күн бұрын
Thank you so much for your kind words! I'm glad you find them helpful 🙏
@tomashorsky331611 ай бұрын
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
@AliElZoheiry11 ай бұрын
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
@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 Жыл бұрын
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 Жыл бұрын
@@AliElZoheiry Hey Ali ! Thank you very much clearer now , thank you so much !
@udoma87 ай бұрын
@@AliElZoheiry My thought since has been how you figured out this particular logic, it is clean and also very uncommon while looking common
@Зритель-ш6у11 ай бұрын
Amazing tutorials! Learning a lot in here. Keep up the good work!
@AliElZoheiry10 ай бұрын
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!
@CCCRWWE Жыл бұрын
Awesome, thanks you Ali.这是我见过最好的AI教程
@AliElZoheiry Жыл бұрын
You're welcome 🙏 I'm very happy that you enjoyed it 😊
@ericcrary238011 ай бұрын
Ur series is amazing and you are very appreciated
@AliElZoheiry11 ай бұрын
Thanks so much for saying that. I appreciate you too 🙏
@kristopherjones59916 ай бұрын
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.
@AliElZoheiry6 ай бұрын
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
@ragnorucca66376 ай бұрын
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?
@AliElZoheiry6 ай бұрын
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
@TheFalcoGamingDK11 ай бұрын
Hey Ali! Great work with the video. Proberly the best guide in the world ngl.
@AliElZoheiry11 ай бұрын
Thank you for the kind words! I'm really glad you found the video helpful. Your support means a lot!
@DigitalFringeHub2 ай бұрын
PatrolRoute variable is not showing up in the Details panel of BP_Enemy_Base, even after I’ve created it and made it instance editable. Why is it so?
@AliElZoheiry2 ай бұрын
Hey! Make sure that you have the variable set to be public and check if it's not hidden if you're using a custom editor view. Sometimes it might just be a refresh issue, so try re-opening the blueprint as well. and of course, don't forget to compile. Hope that helps! 🙏
@RyanCSUMB2 ай бұрын
Hey Ali great tutorial so far, im trying to follow along but im having an issue with the behavior tree accessing the 2nd node when its a movement altering node. When you originally had it as wait, the tree for me wouldn't access the node, switching wait to be the first node made it work that way. Similarly at around 23 minutes when you change BTT_MoveAlongPatrolRoute as the first node on the tree so that the AI will run to the spline and then walk, it will no longer access the 2nd node of BTT_SetMovementSpeed to make it walk. any idea what is going wrong here for me?
@AliElZoheiry2 ай бұрын
Hey! I'm glad you're enjoying the tutorial so far 🙏 If your tree doesn't continue in the node of a sequence branch, that means that the task where it stops at has failed. Meaning it didn't return "Finish execute" with success = true. So try to find the reason why your task is failing (maybe you just forgot to check the "Success" checkbox on the finishExecute function at the end of the task)
@RyanCSUMB2 ай бұрын
@@AliElZoheiry Thank you Ali!
@Dominicn123 Жыл бұрын
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 Жыл бұрын
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 kzbin.info/www/bejne/opfPopeXo8Scqdksi=uuNEQicb9ihrna48
@Dominicn123 Жыл бұрын
i just became a patron so i'm gonna check out your project files@@AliElZoheiry
@Dominicn123 Жыл бұрын
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 Жыл бұрын
@@Dominicn123 unfortunately I don't have the project saved after every tutorial, that would fill up all my cloud storage very quickly 😅
@ong8163 Жыл бұрын
me too
@Secretlycat31 Жыл бұрын
I'm now stuck at 33:15 I'm not able to get a reference to 'self' it just isn't coming up? Any idea why?
@Secretlycat31 Жыл бұрын
Well I fixed that but now the ai isn't moving. When I take away the state stuff it works but not at the moment.
@AliElZoheiry Жыл бұрын
Open your behavior tree while the game is running to see what's happening
@Secretlycat31 Жыл бұрын
@@AliElZoheiry Hello, so in the behaviour tree the patrol state works. But the chasing state is stuck in a loop on the move to player part. And doesn’t move, it just stands still. If you hold down 1 it will then run along the patrol route for some reason.
@Arctan956 ай бұрын
@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.
@AliElZoheiry6 ай бұрын
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
@Arctan956 ай бұрын
@@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!
@AliElZoheiry6 ай бұрын
@@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
@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 Жыл бұрын
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
@_gooseduck6 ай бұрын
33:46 Even if I press the key, it does not change to Attaking state and only Patrol state remains. Does anyone know a solution?
@AliElZoheiry6 ай бұрын
Hey there! I suggest bringing up your behavior tree while the game is running to see if the correct nodes are being executed. I suspect they aren't, but this will tell you where it is failing, then you can dig in that specific area to narrow down the cause further
@_gooseduck6 ай бұрын
if I press the key, the behavior tree only progresses to ROOT>Selector>Passive State.
@_gooseduck6 ай бұрын
If I work BP and BT again, I can't seem to get any input when I press the key 1.
@AliElZoheiry6 ай бұрын
@@_gooseduck Hey I don't really understand what you're saying, but I suggest watching my video on how to find and fix bugs to help you narrow down the problem kzbin.info/www/bejne/opfPopeXo8Scqdk
@_gooseduck6 ай бұрын
Thank for link.
@恥ずかしさをお届け Жыл бұрын
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 Жыл бұрын
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
@恥ずかしさをお届け Жыл бұрын
@@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.
@eugeniivakulenko52818 ай бұрын
Thank you very much sir! Your tutorials are super useful!
@AliElZoheiry8 ай бұрын
You're very welcome! I'm glad you found the tutorials helpful. Thank you for watching and commenting 🙏
@tr.acc42896 ай бұрын
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
@AliElZoheiry6 ай бұрын
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
@hawthornmoon3d1782 ай бұрын
So far this has been great. Somewhere along the lines I messed something up and my enemy will not spawn the weapon after pressing one. Somewhere between adding the keyboard function 1 and creating the nodes for returning to the patrol. I'm going through the whole thing again but if at all possible, I'd love to get some assistance with it.
@AliElZoheiry2 ай бұрын
Hey, glad you're finding it useful! 🙏 It's impossible for me to know what you did though to cause that, it could be anything. Just make sure to trace your logic closely and see where it went wrong. Try adding print statement and breakpoints a long the execution path
@arthurwilliamsmukambe6014 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 🤞
@kishanthakar871519 күн бұрын
So if your unsheath and destroy actor is not working add in a 1 second wait after btt_wieldweapon. Unreal gets confused and tries to blend it together
@AliElZoheiry14 күн бұрын
Sounds like you might not be waiting for the animation to finish before ending the task. So double check the event dispatchers, that they are being called at the right times and connected to the right pins
@sebastianmoran59662 ай бұрын
After following through the tutorial until 34:18 my enemy AI still wont change state after I pressed 1
@AliElZoheiry2 ай бұрын
Hey! I would suggest adding some breakpoints to your blueprints to see where it goes wrong
@WeAreNIM Жыл бұрын
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 Жыл бұрын
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)
@ziggiboy1014 ай бұрын
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
@AliElZoheiry4 ай бұрын
Hey! Glad to hear you figured it out. Crashes can be frustrating. If you encounter any other issues, feel free to ask! 🙏
@thanosamv458326 күн бұрын
after doing the enemy movement somehow the animation is glitching forth and backwards, any solution?
@AliElZoheiry22 күн бұрын
Hey! Not sure what the issue is, could be your animations
@deltacake38097 ай бұрын
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...
@AliElZoheiry7 ай бұрын
Hey there! It happens to the best of us 😉 Glad you figured it out in the end!
@retrowrath937425 күн бұрын
Is there any reason why attack target isn't working anymore? I'm not sure if something changed in the newer version(there are changes there now) but Attack Target always stays at none .AIC controller is working, interface is enabled, passive state is working, attack target key name is correct. If I set the attack target as something else than "actor(Base Class)" like BP_ThirdPerson Character it still stays none, it's like it doesn't know what the attack target is and I can't even tell it that it's my player directly. I've basically ran out of debugging options to find out why.
@AliElZoheiry22 күн бұрын
Hey! I'm not really sure what the problem could be. I suggest moving forward with the other tutorial on perception since that modifies the attack target behavior
@Waxiestspoon21 күн бұрын
Did moving on to next video fix it or make it worse? Same issue tried everything on debugging I could find even looked on discord and still no luck and I'm way to ocd to move on at this point lol
@retrowrath937416 күн бұрын
@@Waxiestspoon Yeah doing the perception fixed it but the issue I have now is that only one enemy attacks because BTT_Attack, only casting to one enemy character, I have different enemies. EDIT: Adding a sequence for each cast to the enemies worked.
@denberz7113 ай бұрын
im very new to UE5. Increment control route doesn't exist for me when trying to pull off from patrol route. Not sure why :(
@AliElZoheiry3 ай бұрын
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
@denberz7113 ай бұрын
@@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...
@URKCSEMMANUELARTHERGEORGE9 ай бұрын
i cant get the option to select the patrol route at 8:53
@AliElZoheiry9 ай бұрын
Make sure to click the "eye" icon next to the variable name in the blueprint, so that it shows up in the level
@oerealrap Жыл бұрын
ur screen is very blurry whats the thing u search for at 5:02 to get current index ?
@Зритель-ш6у11 ай бұрын
add +
@Depreska3 ай бұрын
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?
@camillemjx96743 ай бұрын
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)
@Depreska3 ай бұрын
@@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).
@AliElZoheiry3 ай бұрын
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
@Depreska3 ай бұрын
@@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!
@nholmes10 ай бұрын
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?
@AliElZoheiry10 ай бұрын
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!
@PokeGameTCG-Oficial7 ай бұрын
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.
@AliElZoheiry6 ай бұрын
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
@Crowfly11 ай бұрын
45:55 The tree loops the left part section of the combat state. My character does not spawn his sword and just joops the sheath animation. If I press the debug button he holsters his sword and everything continues. I have found a temp solution by dragging the dispatcher straight into the spawn actor. This makes the sword spawn until the montage is complete so it doesnt look so good. If anyone has a solution please share.
@AliElZoheiry11 ай бұрын
Sounds like you have an issue with the montage notify. Make sure you don't have a typo in the notify name, and make sure you're using a "Montage Notify" in your montage and not a regular "Notify", and finally, make sure you're connecting your Switch statement in the EquipSword event to the "OnNotifyBegin" pin when you play the montage.
@Crowfly11 ай бұрын
@@AliElZoheiry Yes you are right, I over looked the animations because I was using my own smh. Thanks for the fast response, you got a bright future in this brother
@shivc038 ай бұрын
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?
@AliElZoheiry8 ай бұрын
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)
@samo42095 ай бұрын
the switching states is not working what could be the problem
@AliElZoheiry5 ай бұрын
Hey, it could be anything really, you need to do a bit more debugging to narrow down the problem area
@humannormal-wg2ii4 ай бұрын
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
@empares3 ай бұрын
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.
@AliElZoheiry3 ай бұрын
Glad to hear you found the fix! It's always the small details that can make a big difference. Thanks for sharing that solution! 🙏
@JyotiEntertainmentProduction8 ай бұрын
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?
@AliElZoheiry8 ай бұрын
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: kzbin.info/www/bejne/opfPopeXo8Scqdksi=bOIk8RofIkZ9n5_I I hope this helps you in resolving the issue with your AI.
@Redvil016 ай бұрын
Noob question. How do you enable the search bar in the context menu? I don't have it by default.
@jedtanartkulprakrom46166 ай бұрын
CTRL+P
@AliElZoheiry6 ай бұрын
Ctrl + P Indeed ;)
@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 Жыл бұрын
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
@WarzoneATRКүн бұрын
why you substract 1? at 6:02
@AliElZoheiryКүн бұрын
Because an arrays index starts at 0, meaning that the first element in an array is element number zero, and the 2nd is element number 1, etc.. so if I get the number points in the spline (let's say there are 5 points) it will return the number 5, because there are 5 points. But the last element in the array is at index 4, because if the first one is 0, then the 5th one is 4. So you always subtract 1 from the length of an array to the index of the last item
@sajjadmirshabi Жыл бұрын
Awesome, thanks you Ali. Been waiting for it
@AliElZoheiry Жыл бұрын
Hope you enjoyed it Sajjad and thank you for the support. Part 3 is coming out soon as well
@dandimensions8897 Жыл бұрын
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 Жыл бұрын
Hey, not sure what you mean by "can't pull up the increment route"?
@scjohnson243 Жыл бұрын
@@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 Жыл бұрын
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.
@leonfomin92505 ай бұрын
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
@AliElZoheiry5 ай бұрын
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! 🙌