Smart Enemy AI | (Part 19: Player Block/Parry/Combo) | Tutorial in Unreal Engine 5 (UE5)

  Рет қаралды 11,943

Ali Elzoheiry

Ali Elzoheiry

Күн бұрын

Learning Goals:
1 - Different stances: You will learn how to switch between different weapons and stances, such as unarmed, melee & magic
2 - Melee Combos: You will learn how to do melee combo attacks using a single montage
3 - Block & Parry: You will learn how to block incoming damage, and parry if you block at the exact right time
4 - Stagger: You will learn how to do a stagger and slow motion camera zoom effect when the enemy is parried.
To download the full project files from all my videos and use any assets I create in your own games for free, then join my Patreon. Also I would be forever thankful to my early adopters
/ alizoh
Join my Discord server to chat and mingle with the community
/ discord
Link to the full "Smart Enemy AI" Series:
• Smart Enemy AI Tutoria...
Link to the "Shooting Projectiles" tutorial:
• How to Shoot Projectil...
Link to the "Damage System" tutorial:
• How to Build a Combat ...
Checkout my other tutorials on my channel:
/ @alielzoheiry
Chapters:
00:00 Intro
01:02 Adding Melee Stance
10:08 Melee Locomotion Animations
15:47 Simple Sword Attack
21:33 Adding The Shield
29:56 3 Hit Sword Combo
42:24 Block & Parry Functionality
01:05:59 Stagger Enemy When Parried
01:11:21 Next Up In Part 20
Assets used:
FX Variety Pack: www.unrealengine.com/marketpl...
About me:
I've been learning game development for a few years now, I do have a background in software engineering, and I also have a background in education, so being able to combine my love of gaming, software engineering and education is the best way to spend my time.
I am currently working on this 3rd person action adventure game as a hobby, but I am also trying to build a community, thus I am creating KZbin tutorials to find others who are interested in game development and design.
If you are interested in learning more or if you are interested in working together, please let me know in the comments.
#unrealengine #unrealengine5 #ue5 #gamedev #smart #enemy #combat #AI #blueprint #tutorial #behavior #tree #attack #system #behaviortree #player #melee #block #parry #combo

Пікірлер: 99
@squishylover3
@squishylover3 6 ай бұрын
wow, what a great channel for learning. there's 100% a need for content like yours for the community
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you for saying that. I really try to focus on education rather than just entertainment, so I hope it came across as such
@veyghard3217
@veyghard3217 15 күн бұрын
This needs more likes and views! Thanks for providing these for free for the community, dude! You're truly a god send
@AliElZoheiry
@AliElZoheiry 11 күн бұрын
Thank you for your kind words and support! I'm really glad you found the content helpful. 🙏
@oostenmusic
@oostenmusic 4 ай бұрын
Your work with AI is amazing. I would love to see your logic applied to an inventory system!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey, thanks for your kind words! I'm glad you're enjoying the AI content. I'll definitely consider creating a tutorial on an inventory system in the future. Appreciate the suggestion!
@Shizuma450
@Shizuma450 5 ай бұрын
This series is much more than a simple tutorial on AI, it teaches us how to organize our work, how to think, and how to work on a relevant on unreal. I can see you getting more and more at ease with the camera Ali Elzoheiry, and it's really cool, always smiling, explanations mixed with passion that makes a video really interesting to watch, so much so that I didn't see the time pass while watching the video. I can see small improvements in the editing :P. Thanks for this video, which, as usual, is very instructive!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
I'm very lucky to have you as a supporter from the very beginning, because you can see my progress from the start and I love your commentary on it 😊🙏 I am indeed putting a lot of effort into learning video editing and I'm certainly becoming more comfortable in front of the camera. I'm really happy that you noticed ❤️
@TheKBC14
@TheKBC14 6 ай бұрын
I'm so excited for the boss fight one! Keep up the amazing work!
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you ☺️🙏 I'm excited for it too, I hope everyone likes it
@XvirusX
@XvirusX 6 ай бұрын
thank you so much :D i will join your patreon in the future for the full project :) please keep up the good work and don't stop making videos 😊
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you for the support, I'll definitely keep making more 🙏
@kellowattentertainment
@kellowattentertainment 6 ай бұрын
To be fair, based on the videos you have posted before, I implemented some of these in the player previously, however, it is good to see you do it so that I can say that I have learned from you. You are awesome.
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Indeed, most of the things that I made for the enemy can be applicable to the player. But nonetheless, I wanted to show how to achieve the same melee combat system for the player as there are small differences. And also it's just super cool. I hope you enjoyed it 😁
@ryanjdevlin87
@ryanjdevlin87 6 ай бұрын
This is such a great series man. I have the boss ai toolkit in my game from the ue market and im honestly thinking about pulling it out of the game and going with this or atleast this have given me the confidence to go in and alter that kit. Thanks so much Ali ur the ue5 GOAT!
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
It makes me very happy to hear that, I love seeing how my work helps people, and to see that it gave you the confidence to build your own thing, is exactly why I do this 🙏💪
@wang9731
@wang9731 3 ай бұрын
Your tutorials are great, I have watched many tutorials and yours is the best. Thank you very much for sharing.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Thank you so much for your kind words! I'm thrilled to hear that you've found my tutorials helpful. I appreciate your support and encouragement. Let me know if there's anything specific you'd like to see in a future tutorial.
@TheKBC14
@TheKBC14 6 ай бұрын
Incredible tutorial!
@studio.bam.pictures3683
@studio.bam.pictures3683 6 ай бұрын
I just entered AI Playlist and found this video. Why it is not public? (Great addition to this AI enemy! Love it!)
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you, this wasn't public yet because it was only for early access to my Patrons, you were lucky to find it 😅 but it will go public now
@gamethingstuff
@gamethingstuff 3 ай бұрын
This is legit the best way I've seen someone handle combo attacks and it's legit so good
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Thank you ☺️🙏 glad you found it useful. I can't say that I invented this way of combo handling, I've seen it in a lot of games, I'm just glad I could explain the method ☺️
@PankajKumar-ej5dt
@PankajKumar-ej5dt 6 ай бұрын
I like your teaching style. Content too is awesome btw. So keep it up bro.
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you Pankaj, really appreciate your support 😊🙏
@Mega_Maybit
@Mega_Maybit 6 ай бұрын
I just used your tutorials and actually figured out a way to implement my own parry system, but I’m excited it see how you do it because I definitely jerry-rigged mine!
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Indeed, everything I taught for the damage system can be used to make a parry system, and there are countless ways of doing it. I hope this video was useful 🙏
@Xsabino1
@Xsabino1 6 ай бұрын
I want to congratulate. I look forward to each of your videos.
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thanks again Clark! I appreciate your continued support 🙏
@patricktoussaint6038
@patricktoussaint6038 4 ай бұрын
another great one! excited for the boss!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Nice progress! I hope you enjoy the boss fight ;)
@edmunddarko783
@edmunddarko783 Ай бұрын
great tutorial man..I just subscribed to your channel
@AliElZoheiry
@AliElZoheiry Ай бұрын
Thank you so much for subscribing! I'm glad you found the tutorial helpful.
@user-GamesBond007
@user-GamesBond007 6 ай бұрын
Thank-you Ali for all the great content, your channel will surpass 10k subs in no time! For now an early congratulations. Please remember to like the video everyone!
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
You're most welcome 🤗 and thank you for the support and encouragement ☺️🙏
@tomerhertz8502
@tomerhertz8502 5 ай бұрын
Love you tutorials....cant wait for the next one!!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Thank you Tom, it's coming very soon 🙏
@tomerhertz8502
@tomerhertz8502 5 ай бұрын
Learned so much from this series....each tutorial has great nuggets in addition to the main AI guideline......absolutely GREATTT@@AliElZoheiry
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
That's great to hear Tom! I'm so happy you're finding it useful still@@tomerhertz8502
@trelaskillz
@trelaskillz 4 ай бұрын
Amazing stuff!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Glad you think so!
@RtxRob
@RtxRob 3 ай бұрын
Hi, Loving the series so far, Thank you for making this. Could you please also make a video about flying EQS strafe for smart AI. Thanks.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Hello! I'm glad you're enjoying the series and finding it helpful. Thank you for the suggestion, I'll definitely consider making a video on flying EQS strafe for smart AI in the future. Thanks for watching and commenting!
@TolisPiperas82
@TolisPiperas82 2 ай бұрын
Two things i think must be added in these tutorials.the first is bow stance and the second rolling animation as defense except from parry and teleport that is already. Thinknabout it
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Thank you for the suggestions! I'll definitely take them into account for future tutorials. Appreciate your input!
@Yggdrasil777
@Yggdrasil777 6 ай бұрын
A better way to do the Stance check is at the beginning of the function, do a branch check to see if the Stance is not equal to NewStance, if true continue on. If false, do nothing because there's no need to change. This will work no matter how many stances you have and switch around.
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Ohh hahaha yeah that's indeed simpler, thank you for the suggestion 🙏
@himanshudangwal9838
@himanshudangwal9838 3 ай бұрын
your channel is great i am currently watching building a combat system video, can I watch this video after that video as it adds sword,shield and some combos along with spell ball throwing effect for the main character as other videos focus on ai I wanted to learn player attacks variation with spells first
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Thank you for your support! It's great to hear that you're enjoying the combat system video. You can definitely watch this video after the damage system tutorial. That is actually the recommended order, since this series uses the damage system in it.
@himanshudangwal9838
@himanshudangwal9838 3 ай бұрын
@@AliElZoheiry thank you sir
@sametcalik4358
@sametcalik4358 4 ай бұрын
Ali, thank you for your great lessons. Can you also show us how to parry the projectile?
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
You're very welcome, and glad you liked it! I actually made an extended version of the boss fight where you can Parry projectiles but I didn't release it because it was a bit messy, but I will consider refining and releasing it soon
@sametcalik4358
@sametcalik4358 4 ай бұрын
@@AliElZoheiry Great news, I'll stand by. I hope everything works out the way you want it to.
@sjrulz14
@sjrulz14 5 ай бұрын
Great channel. Great mind. ❤ How did you learn all this?
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Thank you, I really appreciate that 😊🙏 I myself learned all of this from various sources. The proper programming techniques came from my 10+ years of experience as a software engineer, and the game dev knowledge I learned from a mix of online courses, books, conferences, meetups, tutorials, etc.. The best to learn is by doing
@osmanbaba1485
@osmanbaba1485 2 ай бұрын
Don't mind me I'm from Part 6, just getting myself motivated
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Of course 🙏 Thanks for watching and commenting
@OiItsPhantom
@OiItsPhantom 6 ай бұрын
Would it be possible to add actions for AI to do when patrolling? For example in hitman gaurds or npcs will take a smoke or call someone on their phone in between their patrol paths. Would you be able to add an option for an npc to perform an action of some sort along their path?
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
That's just a matter of playing an animation when idling, nothing really to do with AI behavior, just a different idle animation
@OiItsPhantom
@OiItsPhantom 6 ай бұрын
@AliElZoheiry oh okay my apologies haha. One other thing. How about something like in Batman Arkham where once enemies realize some of the gaurds have been taken out or are missing the remaining gaurds start roaming in pairs due to fear of roaming by themselves and watch their back while roaming. Would that be something cool you can add?
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
@@OiItsPhantom No worries at all. Thank you for the suggestions, I'll consider your request 👍
@OiItsPhantom
@OiItsPhantom 6 ай бұрын
@AliElZoheiry Sounds good. Would be dope if you can figure something like that out. I plan on making a stealth game and have been checking out your AI playlist for enemies and gaurds. Awesome work so far!
@BooneyianLogic
@BooneyianLogic 5 ай бұрын
Hello again, sorry if I'm a bother. I seem to have an issue with the block function, it will block the 'sphere trace damage' for melee attacks. However the spin attack uses the aoeslash which seems to not be blocked. any insight would be much appreciated.
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hey, no worries. One thing to note that might be causing your issue, is that in the DamageInfo struct we pass to the TakeDamage function in each attack event, there is a CanBeBlocked and CanBeParried input variables that we pass. Make sure that CanBeBlocked is set to "true" for the attacks that you want to be blockable
@kellowattentertainment
@kellowattentertainment 6 ай бұрын
Alright, so I've noticed a bug with the damage system. When the Melee enemy in particular attacks with an attack that Is set to "Is not interruptable," if you attack the melee enemy during that time, he only loses health (and you can see his health bar going down). but it completely ignores the "Was Damaged" boolean in the "take damage" function. This means that anything that should happen whether true or false from the "was damaged" boolean, doesn't happen. The "Is Iinterruptable" boolean, not only ignores animations but everything else. What would you recommend doing to fix that so that only animations are ignored and everything else functions?
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
If you followed my Damage System tutorial to build your damage system, then you might not have this connection I show here in this screenshot prnt.sc/cPoik9FjZtLW This is in the TakeDamage implementation inside the BPC_DamageSystem, I forgot to add this in the original tutorial, so if you're missing this connection, that would cause the exact problem you are mentioning
@LeagueSpamAccount
@LeagueSpamAccount 6 ай бұрын
Hello, thank you for this fantastic series; it's truly helpful, and you are an excellent teacher. While this might be a bit off-topic, I'd like to inquire about creating a zombie AI with somewhat clumsy movements akin to those in Resident Evil 2. I'm unsure of the process, perhaps involving a montage for the zombie's motion instead of a conventional movement. Additionally, if the zombie were to grab the player, providing a reaction option or the possibility of getting bitten... could you guide me on implementing such mechanics? Your expertise would be greatly appreciated. Btw my english is not great so i asked chatgpt to make it better thats why it may seems weird :D
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Hey, thank you ♥️ glad you liked it. Regarding your question; everything I've taught in this series can be applied to any type of enemy. The main things to learn are behavior trees, EQS, navigation, etc.. So if you understood these concepts you can apply them to any type of game and enemy, you just have to think what behaviour you want and of course you'll need a lot of animations
@TheVorlecGame
@TheVorlecGame 2 ай бұрын
Hey Ali, just a quick question over here, i have a Stun animation that lasts aprox 3 secs, but when i got the enemy stunned through the damage response, it only plays like a second of it before it starts attacking again, any solution?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Sounds like you play a montage that is expected to last for 3 seconds, but the task itself in the behavior tree finished before the montage is over, thus interrupting the montage and ending the animation. If you want to do something for a set amount of time, you need to make sure that the behavior tree task waits until that time is over before finishing
@jiabinxiong72
@jiabinxiong72 6 ай бұрын
太赞了!持续关注中...
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
我很高兴你喜欢它 🙏
@Im_pro_true16
@Im_pro_true16 5 ай бұрын
Question: how to make the block function to have a stamina bar so that the player can't block forever, also how to make the player take a little bit of damage when they block, but still no damage when they parry
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
You can have an additional stamina/stagger variable in the damage system, that decreases every time the player blocks, and refills after the player hasn't taken any damage for some time. Then check the value of this variable in the block function, and if it's zero, make the block fail and the player will take damage.
@Im_pro_true16
@Im_pro_true16 5 ай бұрын
@@AliElZoheiry thank you
@Im_pro_true16
@Im_pro_true16 4 ай бұрын
​​​@@AliElZoheirysorry but, another question, the parry button doesn't work how to fix that too?, thank you.
@ZimMabu_GameDev.
@ZimMabu_GameDev. 6 ай бұрын
Thanks,Thanks,Thanks! Where we can play your games?
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
You're very welcome, glad you liked it 🙏 I don't have any games published unfortunately (other than small game jam type things) but I'm hoping to release something soon 🙏
@ZimMabu_GameDev.
@ZimMabu_GameDev. 6 ай бұрын
@@AliElZoheiry Nice we waiting :)
@gamedevunity3dliviopanizzi170
@gamedevunity3dliviopanizzi170 2 ай бұрын
great , for the combo the ia how i to do ?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Sorry not sure what you mean
@gamedevunity3dliviopanizzi170
@gamedevunity3dliviopanizzi170 2 ай бұрын
the enemy action a single attack,for attack combo?@@AliElZoheiry
@mhahveergujjar
@mhahveergujjar 6 ай бұрын
Make a video explaining what is the process if you want to publish a Nintendo Xbox game, how much does their developer kit cost and how to do it and what is the process like?
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thanks for the suggestion. Definitely an interesting topic to tackle, the post development process is not talked about enough. I'll add it to my list of suggestions
@zuka9748
@zuka9748 6 ай бұрын
amazing chanal
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you! glad you like it
@sara-uh8xy
@sara-uh8xy 6 ай бұрын
yooo well second to comment but noice video, still at episode 5 but noice, will u tell us how to do the riposte from darksouls as well ty
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you Sara 🙏 For counter attack, it's really the same as the Parry window. Just add a "CounterWindow" in the "Successful Block Montage" and if you attack within the counter window, then play a counter attack montage instead of the regular one
@angryralphs2516
@angryralphs2516 6 ай бұрын
Hidden gem
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
I appreciate you 😊🙏
@taylorroberts70
@taylorroberts70 3 күн бұрын
Man why did I have to put my block in the animation graph 😭
@AliElZoheiry
@AliElZoheiry Күн бұрын
Hey. The main reason is because blocking is a "State" meaning that it's not a one-off action like a sword swing, since you can be in the blocking state indefinitely or for variable amounts of time. That's why it's best to put it in the event graph, because a montage will just play the animation once and then stop (you can't loop a montage, thus you can't create a state from a montage)
@user-xb1jc7lf8x
@user-xb1jc7lf8x 6 ай бұрын
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
😊👋☺️😌🤗
@fostn
@fostn 6 ай бұрын
This is amazing 🤍
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Thank you. Glad you found it useful 🙏
@Vivekrathod2264
@Vivekrathod2264 6 ай бұрын
Literally loving your video. I have a doubt i want to add one thing in game like god of war, when we are killing the villain or monster in god of war sometimes the scenes is in slow motion and tell us to press E key and kill the villain. Can i send you an example? On insta I hope you'll understand and reply me big fan ❤
@AliElZoheiry
@AliElZoheiry 6 ай бұрын
Glad you're liking my tutorials 😊🙏 I know what you're talking about, these are called QTE (Quick Time Events) and they can be done in a lot of different ways. Try researching the topic a bit and let me know what you find
@Vivekrathod2264
@Vivekrathod2264 6 ай бұрын
@@AliElZoheiry yeah thanks man i got the video on QTE but there's no tutorial. if you're next tutorial is on QTE it will help a lott. The videos on QTE are like 20 to 30 sec long just showing how it works. And most important where can i talk to you on? I wanna discuss more topics on function for game dev
Smart Enemy AI |  (Part 20: Boss Fight) | Tutorial Unreal Engine 5 (UE5)
1:05:42
Why Dependencies are Bad and How To Avoid Them In Unreal Engine | UE5
26:40
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 528 М.
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 20 МЛН
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 36 МЛН
20 Unreal Engine Tips You NEED to know | UE5
8:38
Ali Elzoheiry
Рет қаралды 16 М.
The KEY to every GREAT fighting game.
8:01
Typhoon
Рет қаралды 102 М.
Unreal Engine 5.4 Motion Matching in 13 Minutes | 2024
13:41
Reality Forge
Рет қаралды 70 М.
Bow & Arrow Masterclass | Unreal Engine (UE5) | Part 1
44:04
Ali Elzoheiry
Рет қаралды 13 М.
Markiplier and JackSepticEye Compete to Make a Game in 2 hours
22:07
Corridor Crew
Рет қаралды 3,4 МЛН
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 85 М.
Minecraft: Who was the best? 🤔 #Shorts
0:29
Twi Shorts
Рет қаралды 44 МЛН
60* Satisfying minecraft pixel art #shorts #gaming #sandart
0:31
Три криперёнка в minecraft! 😱
0:29
ТИТМАУС
Рет қаралды 1,6 МЛН