Seriously jumping is so overlooked. This would be like a footnote or bonus content in other lesson series, but here you are making it an entire video. I'm implementing this in 5.4 and still working perfectly so far to this point. I'd go through this a bit quicker but the ADHD is slowing me up.
Hey, I'm glad you found the jumping tutorial valuable! It's great to hear it's working well for you in 5.4. Take your time, and feel free to revisit anything you need to. Thanks for sharing your thoughts! 🙏
Woot! I was just going through your AI Series for a second time here today to really cement the information you have provided us to memory. I have pretty heavy ADHD, and it takes me 2 or 3 passes of practicing any skill, learning information, etc. To really set the skills in place. I'm quickly going through it again first thing next week, before diving into my own projects' AI. Personally, I believe you have the best development practices for UE. Out of the several I've learned from on here and other platforms. Which allows for very dynamic and flexible gameplay design/development(which is critical for larger games). I've been looking forward to the next video in this series. And, now I have something to look forward to first thing tomorrow. I was so stoked to get the alert on my phone a minute ago, right after calling it a day. Anyone reading this far. Thanks for the patience. Subscribe. Hit that notify, and give this man a like. If you can, help support through Patreon. This is exactly the content the newcomers(even those who've been around for a while) to Unreal Engine need. (Note: I am not affiliated in any way, just a fan XD) Peace, and great week/weekends to all.
Thank you so much for this message and for your continued support 🙏 It means a lot to me that you think very highly of my content, this is exactly what keeps me going and puts a smile on my face every time I read it. I'm very happy that these videos are useful for you, and I hope to continue putting out content you enjoy ;)
My pleasure :) I've learned so much about AI within UE from your generous content, I would not have learned anywhere else this easily and well explained. I feel like it belongs in a paid course, which is why I subscribe to your Patreon. To help support, and encourage those who do great work. Means we all can lift up, gain knowledge, and grow. I've not gotten to this video yet, but I'm sure it's great. Life stuff makes things very busy at times. I'm looking forward to future content as always :) Have a fantastic weekend!✌& Stay Blessed 🙏
No joke was just trying to figure out how to make some creatures do a jump attack the last few days. I got something working but I bet this will help smooth it out. Thanks for all the amazing tutorials!
@@AliElZoheiry hey man there is a problem with the links ....have you tryed compiling the project ? .....whell in the editor all works as suposed to but when compiling the project for shipping and export as a game then when you play the game the links are not working anymore ..is like they dont exist .....can you check that out and see how can we fix that? ty
Hey there, I did not find anyone posting this problem I have. My AI launches into air but then accelerates movement back to smart link starting point. So it should get to point B but somehow maybe starts pathfinding within the air to smart link start again. It nearly never reaches the point B. Did not find a solution :/ And one suggestion, but sure You know more: in "Suggest Projectile Velocity Custom Arc" You can also expand the function and use "Arc Param" to about 0.2 to have a better launch hight without adding static hight numbers to the calculation. :) Thanks for your effort. I need to make a suggestion also to EQS Testing Pawn, but in the right tutorial 😊
Hey there! It is indeed a correct assumption that while in the air, the enemy tries to recalculate the path since the MoveTo node is still active while the enemy is jumping. Might be good to try ending the MoveTo node when the AI jumps, and start it again when they land
These videos are absolutely fantastic! I believe at one point you said that you were interested in things you might be able to add to your AI. I've got a couple of ideas that might be neat to try out. The first thing kinda builds off this vid as in just having a basic jump (I might've missed it if you mentioned it here). Predefining smart paths for every jump an enemy could make seems tedious especially for larger more open, or procedurally generated environments like with all your paths on the new island you made. But even more so, I think it'd be cool to see different types of jumps depending on the height of the vertical distance. For example, maybe one cube height in the test map is a normal jump, 2 cube heights is a mantle, and maybe 3 cube heights is a jump AND mantle. Taking that even a step further, to really test the bounds of AI, I wonder if it would possible on like a 4 cube height, for the AI to check the area, grab one of the blue cubes (or viable target mesh), drag it to the wall, jump on the blue cube then jump/mantle up. I understand that last starts getting pretty advanced, but would super cool to see, and might work around having to script all of possible jumps in a level. The next idea is trying to implement a weapon drop system, where you and enemies can knock weapons out of each others hands, dropping the mesh, and having the AI try to retrieve the weapon or find a new one (I think the new Legend of Zelda games do something like this). I'd think this implies the need for a rudimentary inventory system for the player and enemy, and maybe even flexible characters jobs or enemy skill trees depending on what weapon an AI finds (a ranged enemy finding a sword for example). Maybe even a panic state when the enemy tries to run away or fist fight you if it can't retrieve a weapon like an elaborated flee sequence you added earlier on. I understand those are beefy ideas, but these vids are so good, and the possibilities for you to go are so extensive. With the quality of games getting higher and higher, the expectation of AI gets greater and greater. I'm so excited to see how you keep building on these concepts, and would love to see you push the base templates to the absolute limits! Once again fantastic videos! I wish you the best!
Thank you a lot for the tutorials, I'm learning unreal and with your videos I learn a lot! There's a way that if I have questions I can ask you directly? Thanks once again, you are the best!
Hi there!))) I believe this "In the air defect" you've mentioned (27 min) could be produced if you jump off the platform and then promptly jump back on the platform. (I mean jump here and there promtly!) In this case AI jumps off the platform and than promtly makes a jump back WITHOUT TOUCHING THE GROUND.
Hmm… can’t seem to reproduce it, but I think it’s fair to say that the Nan link jumps need some refinement to work as expected, they don’t really do everything they are supposed to out of the box
Just wanted to point out, the simple links are still useful when using the Smart Link, even if only temporarily you can move your simple links, click "Copy End Points from Simple Link to Smart Link" and then remove the simple links if you wanted to. I don't think they really affect it much leaving them in.
Hey! That's indeed a good point, but be aware that keeping them does have risks, because then you're leaving it up to the AI controller's internal logic to select between the smart and the simple at some points. Which is why leaving it in could lead to the AI going to the link location and not doing anything
What you can do is clear the array 'Point Links' on Begin Play. That way you can use the simple links as an editor tool and they clean up and remove themselfs when you actually play the game
@@tsarcharchar6181 I use the simple link positioning too and then click "Copy End Points from Simple Link to Smart Link", but keep the simple link. Just because my blueprint also has the array with Point Links cleaned on BeginPlay. But you can rearrange the simple link easy down the road and replicate to smart link. Did not find a BP solution to replicate from simple link on BeginPlay too 😄
Amazing tutorial! just what I needed to make my AI jump through platforms. I realized that you can keep the simple links, place them with the arrows, and then click the button "Copy End Points from SimpleLink to Smart Link", that moves the smart links position to the simple ones, this way the placement is much easier and less annoying. I kept the simple ones in my case, and it still worked, do you know if they affect the AI somehow? if they do, is much easier to delete them after the placement is done, than doing the placement manually 😊
Glad you enjoyed it! Indeed I used the same thing with simple links, but I found that sometimes the AI would choose the simple link instead of the smart link randomly, and that would prevent my "reached link" event from being triggered and the jump wouldn't work. I found that removing the simple link prevented that issue from happening
The reason the enemy jumps to their stomach if you don't add 250 is because the root of the capsule is at the center You can add the capsule half-height instead of 250 so that the algorithm is adapted to all enemy sizes.
Indeed, I explained in the video that they jump to the root of the capsule, but what I didn't explain is that simply add the half height of the capsule won't be enough, because it doesn't account for gravity as well, so if you want a super precise jump calculation, you'd need to calculate the parabolic arc manually, but this is a close approximation
Thank you so much man, truly a dedicated teacher, i just have one question, i'm creating an open world game, so there are alot of place to placed the nav links for it to work, would it be costing at all? and how costing it could be, thanks!
Hey, thank you for your kind words! I'm glad you're finding the tutorials helpful. Placing a lot of nav links in an open world game could have some cost, as it may impact performance due to increased complexity in pathfinding calculations. However, the impact can vary depending on the scale and optimization of your level. I'd recommend testing and optimizing to find the right balance between functionality and performance. In general, for open world games, navigation should be localized and not one giant nav mesh for the entire map, so if you have localized navigation somehow, then the navlinks won't be an issue either. Good luck with your open world game! 🌍
Yeah that would work nicely, instead of calling a jump function you can call your destroy wall function, and the AI will try to continue walking through
Thanks for your tutorial man, it helps a lot to me as an intro to learning UE's blueprint. But one thing that I don't quite understand might be why exactly you clear the timer before starting a new one in the lostSight event. Because in my mind if the enemy's in a situation which it's attacking player and on the way of doing so it passes another "player", wouldn't this make the enemy trigger HandleLost Sight again and then clear the timer on the current player that the enemy is chasing and starts the timer on another player instead?(which makes your condition check on whether the target is seen again kinda useless.)
Hey, you're welcome man. Let me explain why I do this clear timer. It's common practice when dealing with timers to always make sure that when starting a new timer, you don't already have one running if you want to override it, otherwise it doesn't get overridden and the old timer continues normally. It's an edge case, and most likely won't happen, but always good to prepare for it anyway
in that very last part, where you used 'Cast to Character', why didn't you 'Cast to BP_EnemyBase'? Would 'cast to character' mean any actor is the attack Target, in this case? sorry is the question is dumb, if just never seen a Cast that does not specify the BP is referring too :(
Hey there, thanks for your question! The reason I used "Cast to Character" instead of "Cast to BP_EnemyBase" is because "Cast to Character" is a more general cast, and in this case, we are not specifically targeting the BP_EnemyBase. This allows for flexibility in case the attack target is not always an instance of the BP_EnemyBase. It also enables the system to work with any actor that meets the criteria for being the attack target. No worries, it's not a dumb question at all! I appreciate your engagement and curiosity in understanding the implementation. Keep the questions coming 🙂
Thanks for this great tutorial. I have a small issue with the jump. For some reason the AI isn't consistently jumping with the same intensity each time. Sometimes they jump short, sometimes they fly way too high. I'm not sure what could cause this. In my case the gravity scale is 3, so I plugged -980 x 3 into the gravity override to make it match the character's so it works, just not consistent. Unsure if it's related.
Make sure that the "override XY Z" are checked on your "Launch character" function. Otherwise, the initial velocity of the character will be added to your jump velocity
Hi Ali, first of all thanks a lot for this tutorial. I'm running in an issue that's not addressed here, maybe you or the community has a suggestion on how to solve this: when launching the ai character and he bumps into the player or any other obstacle in air he can land outside the navmesh. How do I prevent this edge case? Cause ai will be stuck there forever.
thanks for the reply. For anyone who is interested I found a fix for this edgecase: I do a line trace every 3 seconds from the character (+ a view units up in Z axis) to the ground. I check the trace if it hits the nav mesh. In case not, I teleport the character to the nearest point on the nav mesh. I added a nice particle effect as well to make the teleport look good. If teleporting doesn't fit to your game you could maybe also experiment by lerping the location of the ai character to the nearest navmesh point or something like that.
If anyone has a bug where the AI stops looking at the player then make sure to go into the behavior trees and set the BTT_Focus to the correct target. When editing the BTT_Focus task all the focus tasks in use reverted to self actor for me.
Thanks for sharing this tip! It can definitely come in handy for others experiencing a similar issue. this is an unfortunate bug in unreal engine. If it keeps happening I found that deleting the node and adding it again often prevents it from happening again
Hi! I'm trying to do the same thing, but through C++ and I kind of succeeded, but there are a couple of problems. 1) My AI jumps to a hill along the trajectory of the Smart Link, but when it needs to jump off, it does not jump off, it just jumps on the spot. 2) In your video, your AI jumps exactly along the trajectory, and my AI jumps through C++ either above the trajectory or below. Maybe someone can help me with this problem?
Hey there, I'm not sure why your enemy would not be jumping down, unless the end point in the link is not configured correctly. Or maybe you can a setting on the character movement that they can't fall off ledges.
Thank you! It will "Work" with multiple enemies, but it's not yet optimized for groups to attack, that will be the topic of a later video (possibly even the next video, but I haven't decided yet)
Really enjoying your videos, really helping me out. I need to ask something, My AI starts Jumping while not facing towards the navlink proxy. So, it keeps jumping in the air and doesn't get anywhere. Can I get any suggestion on fixing it?
Hey there, glad you're finding this useful 🙏 Not sure what the problem is that you're facing, but if you're on v5.3 of unreal engine, I heard it has some issues with the launch character function and needs some adjustments to the impulse values
You can use a different node other than launch character, you can try to calculate the trajectory manually and update the position of the enemy overtime following that trajectory using set location and timelines. Although more complex, it will be much more precise since it doesn't deal with physics @@Imtinan.ACEDIA
(Solved) (This is addressed at 18:20) Really loving the series! I'm having a bit of an issue with this one where for some reason sometimes when my AI gets to the nav link he jumps then faces the wrong direction and jumps straight back down/ just loops jumping. has anyone else had this issue or know what might be going wrong?
Thanks for responding Ali! The UE5.3 issue is actually with the DetourCrowd AI controller. i haven't solved that one yet unfortunately. its weird though as in project files from your patreon it doesn't seem to be an issue at all. not sure why but it completely wrecks the Navlinks. Character just gets stuck in a loop of jumping. Any idea how to fix this? was just going to use the normal AI controller until i can work it out if not. i can upload a video or something on the discord if that would help :) Thanks @@AliElZoheiry
Did anyone manage to solve this? Have the same issue with DetourCrowd AI controller. Enemy goes straight back to the navlink midair and keeps jumping. @@KvltWitch
i have a question. at 11:30 do you have to change the arc param to a higher number inside the suggested projectile velocity custom arc node? when i have it at 0.5 my character loses all of its momentum straight away once it jumps and it basically gets stuck in a jumping loop trying to get up to the player. btw i love this series thank you for making it!
Hey Adrian, This function is a bit finicky indeed, you have to play around with the values a bit to find what works for you, or if you want a more specific calculation, you can do the parabolic math yourself, but for me, I found that the default Arc value of 0.5 works well for when the enemy is close (within 500 units from the target), but then for my boss fight, I will be changing it to 0.95 for the boss enemy, because the boss jump from very far away (2000+ units away) so 0.95 makes him jump almost in a straight line to the player. Summary: The further away the target, the higher you will need to make your arc value (which will decrease the arc angle)
Thank you for your awesome tutorial videos. I would like to implement a way for a character to jump through a link when the character has the jump skill and is not on cooldown, and to move along a different path when the character does not have the skill or is on cooldown. I don't want the navmesh to tell him that there is a path on the link side even though he can't jump like at 8:24. How can this be implemented?
You either remove the nav link from the level when the jump is on cooldown, so that it doesn't show up during navigation at all. Or, you have the AI move to a custom location when they can't jump (thus not taking the default shortest path)
How would I do this is in a large map base building game? It’s not possible to put thousands of Nave Links across the map, and a player built base would not have NavLinks either
You can always add those navlinks programatically as part of another actor, or you can create your own version of the nav link, but then you'll need custom path finding and navigation algorithms.
Hey Zip, yeah that's a great idea, I have it planned in one of the next parts, I'll be setting up a team variable so that enemies know who's a friend and who's a foe, and I'll also be covering group combat
Hi thanks a lot for the series bro, I have a request and hope you can cover. I want an AI targeting that same as MOBA games, example, an AI attacks a chair blueprint that's along his path and simulates physics when destroyed then AI goes back to its original path. Every tutorial covers AI attacking players so I find it hard to learn.
You're most welcome 🙏Regarding your question; by default the perception system is only set to perceive "pawns", so if you want your enemy to attack an object, then you'll have to make sure that object is of class pawn. Otherwise you'll have to edit the perception system yourself (in C++) to allow the AI to sense other types of actors. Alternatively, you can do "Perception checks" yourself, without using the AI perception component, by using the EQS, you can filter for specific actors that are in line of sight of the AI, and then you can set your AI to attack that actor. I'll consider doing a future video on that
Not sure what exactly the problem is, but getting up from a lower platform to a higher one, the AI either barely makes it, or lands short. It never gets close to the actual end point going from lower to a higher position. Any ideas on why it's not launching the enemy with enough force?
Well one thing to note about the launch character function is that it is subject to "Ground friction" and "Air drag" and all other physics forces working on the capsule. So it won't be very accurate all the time, if you want it to be consistent, then you can try disabling ground friction (by setting it to 0 on the character movement component) right before the jump, and restoring it's value after the jump
Make sure you also right clicked and typed in Event Smart Link Reached. if you did it by clicking the + like he originally did, but he deleted it, what it does is create a event that you have to bound in your begin play for it to trigger.
The alternative approach is to create a custom actor (like a nav link) yourself and have the enemy look for them and go to them (Using an EQS maybe) when the player is unreachable (which you will also have to continuously check yourself) and then once there you tell the enemy to jump.
You could do a line trace on the AI. if it traces something in front, you could trigger a jump. That would be more efficient as you don't have to manually adjust the nav link. The AI would automatically detect if can jump or not.
There is always a way. I too do not want to manually create these points. The NavLink could probably be spawner adhoc for a specific jump. There should also be other alternatives. Depends on the mechanics I guess. Open world is very different from a small obstacles-filled map.
Hi, i have been following this amazing series. I only encountered a problem now, I don not have the event on landed at 28:00. Is it because I am using ue4.27? Anyone maybe know why? Thanks
@@AliElZoheiry Oh okay, thanks. I cant seem to find it anywhere but I think I have found a work around. Also I just want to say thanks so much for these tutorials, they are the best tutorials I have seen on YuTube so far, you explain everything so well and clear. These tutorials are really amazing!
"LaunchCharacter" does not work properly since version 5.3 is because the "BrakingDecelerationFalling" value of "Character Movement" is set to 1500. If you change the value to 0,it will behave as in the tutorial.
Seriously jumping is so overlooked. This would be like a footnote or bonus content in other lesson series, but here you are making it an entire video. I'm implementing this in 5.4 and still working perfectly so far to this point. I'd go through this a bit quicker but the ADHD is slowing me up.
Hey, I'm glad you found the jumping tutorial valuable! It's great to hear it's working well for you in 5.4. Take your time, and feel free to revisit anything you need to. Thanks for sharing your thoughts! 🙏
Woot!
I was just going through your AI Series for a second time here today to really cement the information you have provided us to memory. I have pretty heavy ADHD, and it takes me 2 or 3 passes of practicing any skill, learning information, etc. To really set the skills in place. I'm quickly going through it again first thing next week, before diving into my own projects' AI.
Personally, I believe you have the best development practices for UE. Out of the several I've learned from on here and other platforms. Which allows for very dynamic and flexible gameplay design/development(which is critical for larger games). I've been looking forward to the next video in this series. And, now I have something to look forward to first thing tomorrow. I was so stoked to get the alert on my phone a minute ago, right after calling it a day.
Anyone reading this far. Thanks for the patience. Subscribe. Hit that notify, and give this man a like. If you can, help support through Patreon. This is exactly the content the newcomers(even those who've been around for a while) to Unreal Engine need.
(Note: I am not affiliated in any way, just a fan XD)
Peace, and great week/weekends to all.
Thank you so much for this message and for your continued support 🙏
It means a lot to me that you think very highly of my content, this is exactly what keeps me going and puts a smile on my face every time I read it.
I'm very happy that these videos are useful for you, and I hope to continue putting out content you enjoy ;)
My pleasure :)
I've learned so much about AI within UE from your generous content, I would not have learned anywhere else this easily and well explained. I feel like it belongs in a paid course, which is why I subscribe to your Patreon.
To help support, and encourage those who do great work. Means we all can lift up, gain knowledge, and grow.
I've not gotten to this video yet, but I'm sure it's great. Life stuff makes things very busy at times. I'm looking forward to future content as always :)
Have a fantastic weekend!✌& Stay Blessed 🙏
@@theindiegamedude I'm very happy to have you as a supporter 🙏 enjoy your weekend too
@@AliElZoheiry Thanks man✌ Enjoy 🤙
Really well presented with straight to the point and no gibberish. Truly by a Dev for other Devs.
Thank you so much ☺️🙏 that could be my slogan indeed "Truly by a dev for other devs" ♥️
The more I am following you, the more I am convinced you could be an excellent teacher: Calm, clarity and expert. Thanks.
Thank you for your kind words! I'm thrilled to hear that you find my teaching style helpful and appreciate your support.
No joke was just trying to figure out how to make some creatures do a jump attack the last few days. I got something working but I bet this will help smooth it out. Thanks for all the amazing tutorials!
You're very welcome! I'm happy that this came at the right time for you, I hope it helps 🙏
Using BPIs for AI behavior is clever AF, super glad I watched this video, thanks!
Glad you found it useful! Thanks for watching 🙏
Hi, if you don't mind could you explain why it's clever and what would be the alternate method it trumps.
You are a diamond, thank you :) Keep being you. You are very talented and I have learnt so much from you.
Awww that's an amazing comment, thank you, and I appreciate your support 🙏😊
Thank you for this, I learned something new again. Keep it up man.
You're very welcome! I'm glad to hear you learned something new 😊 Thank you for your support!
You are really very genius! Amazing developer! Good job 👍!
Your AI is better than AAA game AI! You awesome person
Wow, thank you so much, I'm glad you think so, and you are an awesome person too!
@@AliElZoheiry Thank you so much for your kind words. Its Truth
Amazing video! You explain things so clearly!
Thank you! Really glad you think so and that you found this useful 🙏
@@AliElZoheiry hey man there is a problem with the links ....have you tryed compiling the project ? .....whell in the editor all works as suposed to but when compiling the project for shipping and export as a game then when you play the game the links are not working anymore ..is like they dont exist .....can you check that out and see how can we fix that? ty
awesome! this work quite well, thanks for the tutorial, simple and cristal clear
You're very welcome! I'm glad you found it simple and crystal clear 🙏
Thanks for making these tutorials, excellent work. Keep up the good job!
You're very welcome, and thank you for the support 🙏
Hey there, I did not find anyone posting this problem I have. My AI launches into air but then accelerates movement back to smart link starting point. So it should get to point B but somehow maybe starts pathfinding within the air to smart link start again. It nearly never reaches the point B. Did not find a solution :/
And one suggestion, but sure You know more: in "Suggest Projectile Velocity Custom Arc" You can also expand the function and use "Arc Param" to about 0.2 to have a better launch hight without adding static hight numbers to the calculation. :)
Thanks for your effort. I need to make a suggestion also to EQS Testing Pawn, but in the right tutorial 😊
Hey there! It is indeed a correct assumption that while in the air, the enemy tries to recalculate the path since the MoveTo node is still active while the enemy is jumping.
Might be good to try ending the MoveTo node when the AI jumps, and start it again when they land
These videos are absolutely fantastic!
I believe at one point you said that you were interested in things you might be able to add to your AI. I've got a couple of ideas that might be neat to try out.
The first thing kinda builds off this vid as in just having a basic jump (I might've missed it if you mentioned it here). Predefining smart paths for every jump an enemy could make seems tedious especially for larger more open, or procedurally generated environments like with all your paths on the new island you made. But even more so, I think it'd be cool to see different types of jumps depending on the height of the vertical distance. For example, maybe one cube height in the test map is a normal jump, 2 cube heights is a mantle, and maybe 3 cube heights is a jump AND mantle. Taking that even a step further, to really test the bounds of AI, I wonder if it would possible on like a 4 cube height, for the AI to check the area, grab one of the blue cubes (or viable target mesh), drag it to the wall, jump on the blue cube then jump/mantle up. I understand that last starts getting pretty advanced, but would super cool to see, and might work around having to script all of possible jumps in a level.
The next idea is trying to implement a weapon drop system, where you and enemies can knock weapons out of each others hands, dropping the mesh, and having the AI try to retrieve the weapon or find a new one (I think the new Legend of Zelda games do something like this). I'd think this implies the need for a rudimentary inventory system for the player and enemy, and maybe even flexible characters jobs or enemy skill trees depending on what weapon an AI finds (a ranged enemy finding a sword for example). Maybe even a panic state when the enemy tries to run away or fist fight you if it can't retrieve a weapon like an elaborated flee sequence you added earlier on.
I understand those are beefy ideas, but these vids are so good, and the possibilities for you to go are so extensive. With the quality of games getting higher and higher, the expectation of AI gets greater and greater. I'm so excited to see how you keep building on these concepts, and would love to see you push the base templates to the absolute limits!
Once again fantastic videos! I wish you the best!
Thank you for your kind words and those great suggestions I'll definitely consider them in the next parts
Great Ali as always thank you very much
Thank you for your kind words! I'm glad to hear that you enjoyed the content. Your support means a lot!
Thanks for your hard work, you are amazing dude 🔥🔥
You're very welcome 🤗 and thank you for the support!
nice new room and nice couch by the way 😂
Thank you! This was only temporary though, back to my old room now
something cool to add would be enemy's can tell other enemy's if they see the player
That's a cool idea! I'll add it to the list
This is perfect
Thank you 🙏
Thank you a lot for the tutorials, I'm learning unreal and with your videos I learn a lot! There's a way that if I have questions I can ask you directly? Thanks once again, you are the best!
You're very welcome 🙏 and if you have questions, feel free to join the Discord server and ask the community and myself, the link is in the description
Hi there!)))
I believe this "In the air defect" you've mentioned (27 min) could be produced if you jump off the platform and then promptly jump back on the platform. (I mean jump here and there promtly!)
In this case AI jumps off the platform and than promtly makes a jump back WITHOUT TOUCHING THE GROUND.
Hmm… can’t seem to reproduce it, but I think it’s fair to say that the Nan link jumps need some refinement to work as expected, they don’t really do everything they are supposed to out of the box
Awesome! Thank you!
You're most welcome!
와 선생님은 최고야 ㅠㅠㅠ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
감사합니다! 선생님께서 이 내용이 도움이 되었다니 저도 정말 기뻐요 🙏
Excellent tutorial, thank you!!
You're very welcome. Glad you found it useful 🙏
Just wanted to point out, the simple links are still useful when using the Smart Link, even if only temporarily you can move your simple links, click "Copy End Points from Simple Link to Smart Link" and then remove the simple links if you wanted to. I don't think they really affect it much leaving them in.
Hey! That's indeed a good point, but be aware that keeping them does have risks, because then you're leaving it up to the AI controller's internal logic to select between the smart and the simple at some points. Which is why leaving it in could lead to the AI going to the link location and not doing anything
What you can do is clear the array 'Point Links' on Begin Play. That way you can use the simple links as an editor tool and they clean up and remove themselfs when you actually play the game
@@tsarcharchar6181 I use the simple link positioning too and then click "Copy End Points from Simple Link to Smart Link", but keep the simple link. Just because my blueprint also has the array with Point Links cleaned on BeginPlay. But you can rearrange the simple link easy down the road and replicate to smart link. Did not find a BP solution to replicate from simple link on BeginPlay too 😄
Could you do a tutorial on AI climbing ladders/walls or just generally how to get AI to replicate player style movements?
Hey there, thank you for the suggestion! That's a great idea, I'll definitely consider it for a future tutorial. Stay tuned! 🙏
Amazing tutorial! just what I needed to make my AI jump through platforms.
I realized that you can keep the simple links, place them with the arrows, and then click the button "Copy End Points from SimpleLink to Smart Link", that moves the smart links position to the simple ones, this way the placement is much easier and less annoying. I kept the simple ones in my case, and it still worked, do you know if they affect the AI somehow? if they do, is much easier to delete them after the placement is done, than doing the placement manually 😊
Glad you enjoyed it!
Indeed I used the same thing with simple links, but I found that sometimes the AI would choose the simple link instead of the smart link randomly, and that would prevent my "reached link" event from being triggered and the jump wouldn't work. I found that removing the simple link prevented that issue from happening
The reason the enemy jumps to their stomach if you don't add 250 is because the root of the capsule is at the center
You can add the capsule half-height instead of 250 so that the algorithm is adapted to all enemy sizes.
Indeed, I explained in the video that they jump to the root of the capsule, but what I didn't explain is that simply add the half height of the capsule won't be enough, because it doesn't account for gravity as well, so if you want a super precise jump calculation, you'd need to calculate the parabolic arc manually, but this is a close approximation
@@AliElZoheiry i meant you can add it to the end location instead of the launch vector
Thank you very much!
You're very welcome! Thank you for watching and commenting
you are a king
No you are ❤️
Thank you so much man, truly a dedicated teacher, i just have one question, i'm creating an open world game, so there are alot of place to placed the nav links for it to work, would it be costing at all? and how costing it could be, thanks!
Hey, thank you for your kind words! I'm glad you're finding the tutorials helpful. Placing a lot of nav links in an open world game could have some cost, as it may impact performance due to increased complexity in pathfinding calculations. However, the impact can vary depending on the scale and optimization of your level. I'd recommend testing and optimizing to find the right balance between functionality and performance. In general, for open world games, navigation should be localized and not one giant nav mesh for the entire map, so if you have localized navigation somehow, then the navlinks won't be an issue either. Good luck with your open world game! 🌍
Would this work in such a manner to where I can make an enemy punch a wall break it and then walk through it and follow the player?
Yeah that would work nicely, instead of calling a jump function you can call your destroy wall function, and the AI will try to continue walking through
Cool tutorial ;)
Thank you 🙏
Thanks for your tutorial man, it helps a lot to me as an intro to learning UE's blueprint. But one thing that I don't quite understand might be why exactly you clear the timer before starting a new one in the lostSight event. Because in my mind if the enemy's in a situation which it's attacking player and on the way of doing so it passes another "player", wouldn't this make the enemy trigger HandleLost Sight again and then clear the timer on the current player that the enemy is chasing and starts the timer on another player instead?(which makes your condition check on whether the target is seen again kinda useless.)
Hey, you're welcome man. Let me explain why I do this clear timer.
It's common practice when dealing with timers to always make sure that when starting a new timer, you don't already have one running if you want to override it, otherwise it doesn't get overridden and the old timer continues normally.
It's an edge case, and most likely won't happen, but always good to prepare for it anyway
in that very last part, where you used 'Cast to Character', why didn't you 'Cast to BP_EnemyBase'?
Would 'cast to character' mean any actor is the attack Target, in this case?
sorry is the question is dumb, if just never seen a Cast that does not specify the BP is referring too :(
Hey there, thanks for your question! The reason I used "Cast to Character" instead of "Cast to BP_EnemyBase" is because "Cast to Character" is a more general cast, and in this case, we are not specifically targeting the BP_EnemyBase. This allows for flexibility in case the attack target is not always an instance of the BP_EnemyBase. It also enables the system to work with any actor that meets the criteria for being the attack target. No worries, it's not a dumb question at all! I appreciate your engagement and curiosity in understanding the implementation. Keep the questions coming 🙂
Как же ты крут!
Спасибо за добрые слова! Рад, что тебе нравится контент!
Wow firs time see in tutorials jumping enemy ai
Well I promised to make them smart 😅
❤❤❤❤
❤️
Thanks for this great tutorial. I have a small issue with the jump. For some reason the AI isn't consistently jumping with the same intensity each time. Sometimes they jump short, sometimes they fly way too high. I'm not sure what could cause this.
In my case the gravity scale is 3, so I plugged -980 x 3 into the gravity override to make it match the character's so it works, just not consistent. Unsure if it's related.
Make sure that the "override XY Z" are checked on your "Launch character" function. Otherwise, the initial velocity of the character will be added to your jump velocity
@@AliElZoheiry Of course it was something as small as a check box. Thanks for that!
Hi Ali, first of all thanks a lot for this tutorial.
I'm running in an issue that's not addressed here, maybe you or the community has a suggestion on how to solve this: when launching the ai character and he bumps into the player or any other obstacle in air he can land outside the navmesh. How do I prevent this edge case? Cause ai will be stuck there forever.
Hey there! I'm glad you found the tutorial helpful. I haven't encountered that issue before so I can't be of much help unfortunately :(
thanks for the reply. For anyone who is interested I found a fix for this edgecase: I do a line trace every 3 seconds from the character (+ a view units up in Z axis) to the ground. I check the trace if it hits the nav mesh. In case not, I teleport the character to the nearest point on the nav mesh. I added a nice particle effect as well to make the teleport look good. If teleporting doesn't fit to your game you could maybe also experiment by lerping the location of the ai character to the nearest navmesh point or something like that.
Chad, thanks sir
You're welcome, glad I could help!
真的很棒,你上个视频说要加上转身,没有看到
Glad you liked it. I talked about adding a turn indeed, but I didn't end up doing it
If anyone has a bug where the AI stops looking at the player then make sure to go into the behavior trees and set the BTT_Focus to the correct target. When editing the BTT_Focus task all the focus tasks in use reverted to self actor for me.
Thanks for sharing this tip! It can definitely come in handy for others experiencing a similar issue. this is an unfortunate bug in unreal engine. If it keeps happening I found that deleting the node and adding it again often prevents it from happening again
Hi! I'm trying to do the same thing, but through C++ and I kind of succeeded, but there are a couple of problems. 1) My AI jumps to a hill along the trajectory of the Smart Link, but when it needs to jump off, it does not jump off, it just jumps on the spot. 2) In your video, your AI jumps exactly along the trajectory, and my AI jumps through C++ either above the trajectory or below. Maybe someone can help me with this problem?
Hey there, I'm not sure why your enemy would not be jumping down, unless the end point in the link is not configured correctly. Or maybe you can a setting on the character movement that they can't fall off ledges.
I have the break vector 3f missing. Just the regular break vector. UE 5.4 here.
I haven't tried 5.4 but it shouldn't be any different, since this is a very basic function
@@AliElZoheiry The automatic animation retargeting in 5.4 is pretty amazing. You have to try it.
You are doing some great work I have seen some of your videos. Will this setup work if there is more then 1 enemy
Thank you! It will "Work" with multiple enemies, but it's not yet optimized for groups to attack, that will be the topic of a later video (possibly even the next video, but I haven't decided yet)
@AliElZoheiry thanks you are doing AAA work keep it up
Really enjoying your videos, really helping me out. I need to ask something, My AI starts Jumping while not facing towards the navlink proxy. So, it keeps jumping in the air and doesn't get anywhere.
Can I get any suggestion on fixing it?
Hey there, glad you're finding this useful 🙏
Not sure what the problem is that you're facing, but if you're on v5.3 of unreal engine, I heard it has some issues with the launch character function and needs some adjustments to the impulse values
Okay, let's see when Epic fixes Launch Character functionality, Do you have any suggestions for how to implement it manually? @@AliElZoheiry
You can use a different node other than launch character, you can try to calculate the trajectory manually and update the position of the enemy overtime following that trajectory using set location and timelines. Although more complex, it will be much more precise since it doesn't deal with physics @@Imtinan.ACEDIA
Great, I'll try it and see how it gooes.@@AliElZoheiry
(Solved) (This is addressed at 18:20) Really loving the series! I'm having a bit of an issue with this one where for some reason sometimes when my AI gets to the nav link he jumps then faces the wrong direction and jumps straight back down/ just loops jumping. has anyone else had this issue or know what might be going wrong?
Hey Patrick, thanks for your comment and I'm glad it's solved, was it indeed a UE 5.3 issue?
Thanks for responding Ali! The UE5.3 issue is actually with the DetourCrowd AI controller. i haven't solved that one yet unfortunately. its weird though as in project files from your patreon it doesn't seem to be an issue at all. not sure why but it completely wrecks the Navlinks. Character just gets stuck in a loop of jumping.
Any idea how to fix this? was just going to use the normal AI controller until i can work it out if not. i can upload a video or something on the discord if that would help :)
Thanks
@@AliElZoheiry
Did anyone manage to solve this? Have the same issue with DetourCrowd AI controller. Enemy goes straight back to the navlink midair and keeps jumping. @@KvltWitch
دمت گرم
Thank you! Glad you liked it 🙏
i have a question. at 11:30 do you have to change the arc param to a higher number inside the suggested projectile velocity custom arc node? when i have it at 0.5 my character loses all of its momentum straight away once it jumps and it basically gets stuck in a jumping loop trying to get up to the player. btw i love this series thank you for making it!
Hey Adrian, This function is a bit finicky indeed, you have to play around with the values a bit to find what works for you, or if you want a more specific calculation, you can do the parabolic math yourself, but for me, I found that the default Arc value of 0.5 works well for when the enemy is close (within 500 units from the target), but then for my boss fight, I will be changing it to 0.95 for the boss enemy, because the boss jump from very far away (2000+ units away) so 0.95 makes him jump almost in a straight line to the player.
Summary:
The further away the target, the higher you will need to make your arc value (which will decrease the arc angle)
thank you for your reply it helped me out a lot! looking forward to your boss fight video!
Thank you for your awesome tutorial videos. I would like to implement a way for a character to jump through a link when the character has the jump skill and is not on cooldown, and to move along a different path when the character does not have the skill or is on cooldown. I don't want the navmesh to tell him that there is a path on the link side even though he can't jump like at 8:24. How can this be implemented?
You either remove the nav link from the level when the jump is on cooldown, so that it doesn't show up during navigation at all. Or, you have the AI move to a custom location when they can't jump (thus not taking the default shortest path)
How would I do this is in a large map base building game? It’s not possible to put thousands of Nave Links across the map, and a player built base would not have NavLinks either
You can always add those navlinks programatically as part of another actor, or you can create your own version of the nav link, but then you'll need custom path finding and navigation algorithms.
Can you show me how to set up a team, such as 2v2 or 3v3,AI of the same type can detect teammates without attacking them
Hey Zip, yeah that's a great idea, I have it planned in one of the next parts, I'll be setting up a team variable so that enemies know who's a friend and who's a foe, and I'll also be covering group combat
Hi thanks a lot for the series bro, I have a request and hope you can cover. I want an AI targeting that same as MOBA games, example, an AI attacks a chair blueprint that's along his path and simulates physics when destroyed then AI goes back to its original path. Every tutorial covers AI attacking players so I find it hard to learn.
You're most welcome 🙏Regarding your question; by default the perception system is only set to perceive "pawns", so if you want your enemy to attack an object, then you'll have to make sure that object is of class pawn. Otherwise you'll have to edit the perception system yourself (in C++) to allow the AI to sense other types of actors.
Alternatively, you can do "Perception checks" yourself, without using the AI perception component, by using the EQS, you can filter for specific actors that are in line of sight of the AI, and then you can set your AI to attack that actor.
I'll consider doing a future video on that
@@AliElZoheiry Thank you so much for your response, highly appreciate it and I'll work on it
Friend teaches you how to make a shark enemy and have it swim in the water and attack the player
Hey! Thank you for the suggestion, i'll definitely consider swimming/flying enemies future tutorials
Not sure what exactly the problem is, but getting up from a lower platform to a higher one, the AI either barely makes it, or lands short. It never gets close to the actual end point going from lower to a higher position. Any ideas on why it's not launching the enemy with enough force?
Well one thing to note about the launch character function is that it is subject to "Ground friction" and "Air drag" and all other physics forces working on the capsule. So it won't be very accurate all the time, if you want it to be consistent, then you can try disabling ground friction (by setting it to 0 on the character movement component) right before the jump, and restoring it's value after the jump
@@AliElZoheiry Thanks! Good to know. I appreciate the help!
at 5:53 there is a good pun
Hahahaha, it was not intended 😅
I have Question.
I try to same way but Link Proxy's Event "Recieve Smart Link Reached" is not firing.
Have you ever encountered the same problem?
Make sure you are using the smart link not the simple link and that "Smart link is relevant" is true in your navlink actor BP
Make sure you also right clicked and typed in Event Smart Link Reached. if you did it by clicking the + like he originally did, but he deleted it, what it does is create a event that you have to bound in your begin play for it to trigger.
Is there an approach to this where it does not use Nav Mesh/Link as sometimes the enemy can trip up or be clunky on the nav mesh.
The alternative approach is to create a custom actor (like a nav link) yourself and have the enemy look for them and go to them (Using an EQS maybe) when the player is unreachable (which you will also have to continuously check yourself) and then once there you tell the enemy to jump.
You could do a line trace on the AI. if it traces something in front, you could trigger a jump. That would be more efficient as you don't have to manually adjust the nav link. The AI would automatically detect if can jump or not.
There is always a way. I too do not want to manually create these points. The NavLink could probably be spawner adhoc for a specific jump. There should also be other alternatives. Depends on the mechanics I guess. Open world is very different from a small obstacles-filled map.
Hi, i have been following this amazing series. I only encountered a problem now, I don not have the event on landed at 28:00. Is it because I am using ue4.27? Anyone maybe know why? Thanks
Hmmm… Not sure if it’s a UE5 thing or not, I assume it should be in UE4 as well, but I haven’t tested it in UE4 to be honest
@@AliElZoheiry Oh okay, thanks. I cant seem to find it anywhere but I think I have found a work around. Also I just want to say thanks so much for these tutorials, they are the best tutorials I have seen on YuTube so far, you explain everything so well and clear. These tutorials are really amazing!
My AI only jump straight up and down, has anyone else run into this?
Hey, I replied to your other comment on video 15
Why two videos hidden bro?
Are they premium
I have no idea, I don't have anything hidden, and UA-cam doesn't show me otherwise. I think it's a bug in UA-cam
the most people struggle with this video on discord. me too. manny is on place doesn't move forward
"LaunchCharacter" does not work properly since version 5.3 is because the "BrakingDecelerationFalling" value of "Character Movement" is set to 1500. If you change the value to 0,it will behave as in the tutorial.
@@Skanwalker thank you very much :) this works for me
Precisely, thank you @KunSka, hope this solves your problem @beppolaut605
Thanks and blesses for this content!🫶
You're very welcome 😁