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

Поділитися
Вставка
  • Опубліковано 20 вер 2024
  • Ігри

КОМЕНТАРІ • 115

  • @squishylover3
    @squishylover3 10 місяців тому +20

    wow, what a great channel for learning. there's 100% a need for content like yours for the community

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      Thank you for saying that. I really try to focus on education rather than just entertainment, so I hope it came across as such

  • @Shizuma450
    @Shizuma450 9 місяців тому +3

    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  9 місяців тому +1

      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 ❤️

  • @oostenmusic
    @oostenmusic 8 місяців тому +3

    Your work with AI is amazing. I would love to see your logic applied to an inventory system!

    • @AliElZoheiry
      @AliElZoheiry  8 місяців тому

      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!

  • @kellowattentertainment
    @kellowattentertainment 10 місяців тому +2

    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  10 місяців тому

      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 😁

  • @alvesesquilo
    @alvesesquilo 2 місяці тому

    Amazing work as always, Ali! You're a very talented man! I'm particularly happy that you leave some bugs and issues to happen in the video, so you can show us why they happen and how to fix them.
    Once more, thank you for your work. I'm a happy supporter at patreon since last year, I hope you keep doing these amazing videos!

    • @AliElZoheiry
      @AliElZoheiry  2 місяці тому +1

      Thank you for your kind words and ongoing support! It means a lot to me. I'm glad you appreciate how I approach bugs and issues in my videos. Your support on Patreon helps me continue creating content, and I'm truly grateful for it. 🙏

  • @veyghard3217
    @veyghard3217 4 місяці тому

    This needs more likes and views!
    Thanks for providing these for free for the community, dude! You're truly a god send

    • @AliElZoheiry
      @AliElZoheiry  4 місяці тому +1

      Thank you for your kind words and support! I'm really glad you found the content helpful. 🙏

  • @ryanjdevlin87
    @ryanjdevlin87 10 місяців тому +2

    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  10 місяців тому +1

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

  • @XvirusX
    @XvirusX 10 місяців тому +2

    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  10 місяців тому

      Thank you for the support, I'll definitely keep making more 🙏

  • @TheKBC14
    @TheKBC14 10 місяців тому +1

    I'm so excited for the boss fight one! Keep up the amazing work!

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      Thank you ☺️🙏 I'm excited for it too, I hope everyone likes it

  • @studio.bam.pictures3683
    @studio.bam.pictures3683 10 місяців тому +3

    I just entered AI Playlist and found this video. Why it is not public? (Great addition to this AI enemy! Love it!)

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому +9

      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 6 місяців тому

    This is legit the best way I've seen someone handle combo attacks and it's legit so good

    • @AliElZoheiry
      @AliElZoheiry  6 місяців тому +1

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

  • @user-GamesBond007
    @user-GamesBond007 10 місяців тому

    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  10 місяців тому

      You're most welcome 🤗 and thank you for the support and encouragement ☺️🙏

  • @wang9731
    @wang9731 6 місяців тому

    Your tutorials are great, I have watched many tutorials and yours is the best. Thank you very much for sharing.

    • @AliElZoheiry
      @AliElZoheiry  6 місяців тому

      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.

  • @Yggdrasil777
    @Yggdrasil777 10 місяців тому +1

    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  10 місяців тому +1

      Ohh hahaha yeah that's indeed simpler, thank you for the suggestion 🙏

  • @Xsabino1
    @Xsabino1 10 місяців тому

    I want to congratulate. I look forward to each of your videos.

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      Thanks again Clark! I appreciate your continued support 🙏

  • @TheKBC14
    @TheKBC14 10 місяців тому +1

    Incredible tutorial!

  • @Mega_Maybit
    @Mega_Maybit 10 місяців тому

    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  10 місяців тому

      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 🙏

  • @RtxRob
    @RtxRob 7 місяців тому

    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  7 місяців тому

      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!

  • @KvltWitch
    @KvltWitch 8 місяців тому

    another great one! excited for the boss!

    • @AliElZoheiry
      @AliElZoheiry  8 місяців тому

      Nice progress! I hope you enjoy the boss fight ;)

  • @PankajKumar-ej5dt
    @PankajKumar-ej5dt 10 місяців тому

    I like your teaching style. Content too is awesome btw. So keep it up bro.

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      Thank you Pankaj, really appreciate your support 😊🙏

  • @tomerhertz8502
    @tomerhertz8502 9 місяців тому

    Love you tutorials....cant wait for the next one!!

    • @AliElZoheiry
      @AliElZoheiry  9 місяців тому

      Thank you Tom, it's coming very soon 🙏

    • @tomerhertz8502
      @tomerhertz8502 9 місяців тому

      Learned so much from this series....each tutorial has great nuggets in addition to the main AI guideline......absolutely GREATTT@@AliElZoheiry

    • @AliElZoheiry
      @AliElZoheiry  9 місяців тому

      That's great to hear Tom! I'm so happy you're finding it useful still@@tomerhertz8502

  • @edmunddarko783
    @edmunddarko783 5 місяців тому

    great tutorial man..I just subscribed to your channel

    • @AliElZoheiry
      @AliElZoheiry  5 місяців тому

      Thank you so much for subscribing! I'm glad you found the tutorial helpful.

  • @TolisPiperas82
    @TolisPiperas82 6 місяців тому

    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  6 місяців тому

      Thank you for the suggestions! I'll definitely take them into account for future tutorials. Appreciate your input!

  • @trelaskillz
    @trelaskillz 8 місяців тому

    Amazing stuff!

  • @sametcalik4358
    @sametcalik4358 8 місяців тому

    Ali, thank you for your great lessons. Can you also show us how to parry the projectile?

    • @AliElZoheiry
      @AliElZoheiry  8 місяців тому +1

      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 8 місяців тому

      @@AliElZoheiry Great news, I'll stand by. I hope everything works out the way you want it to.

  • @osmanbaba1485
    @osmanbaba1485 6 місяців тому

    Don't mind me I'm from Part 6, just getting myself motivated

    • @AliElZoheiry
      @AliElZoheiry  6 місяців тому

      Of course 🙏 Thanks for watching and commenting

  • @theshaderpilgrim6151
    @theshaderpilgrim6151 3 місяці тому

    Great tutoriel, as all the others 😃! I juste have a question. In your Blocking system i don't think you check if sword attack come from Front or from Back, right ?
    On my side I made a setup to check if npc are in front or behind just using Delta rotation (Yaw value in Abs)... It's ok.
    But for separate the multiple melee ennemies instance in two way, one with Damaged unblock, others with Damage block... I'm really struggling.
    Did you have any idea or a tutoriel already done about that ?

    • @AliElZoheiry
      @AliElZoheiry  3 місяці тому +1

      Hey there! Thank you for your kind words and questions. Adjusting melee attacks based on the direction of the attacker is definitely a common challenge. I haven't covered this specific scenario in a tutorial, but I'll definitely consider it for a future video! If you want a tip, just think about using traces to check where the attack is coming from relative to where the player is facing and you can determine attack direction

    • @theshaderpilgrim6151
      @theshaderpilgrim6151 3 місяці тому

      @@AliElZoheiry Ok, many thanks to considere my request and for your advice, I'm staying aware with notification on my side. Good continuation :)

  • @LeagueSpamAccount
    @LeagueSpamAccount 10 місяців тому

    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  10 місяців тому

      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 6 місяців тому

    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  6 місяців тому

      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

  • @Tenchinu
    @Tenchinu 22 дні тому

    i got everything working... except the UpperBody slot anim where you can block as you move.
    Mine just stands still, refusing to move :(
    I can see that is blending the anims, cause you explained it on a previous vid with the jumping attack... but no luck here.
    Any idea what I could be missing?

    • @AliElZoheiry
      @AliElZoheiry  22 дні тому

      If the animation is preventing movement, that means you have "Root motion" enabled on your animation. Make sure to turn that off (it's a checkbox on the animation asset)

    • @Tenchinu
      @Tenchinu 22 дні тому

      yup yup yup. That was it. I combined 3 different anims on that shield block, so had to turn if off an all of them. thnk u so much! :)

  • @himanshudangwal9838
    @himanshudangwal9838 7 місяців тому

    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  7 місяців тому +1

      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 7 місяців тому

      @@AliElZoheiry thank you sir

  • @ZimMabu_GameDev.
    @ZimMabu_GameDev. 10 місяців тому

    Thanks,Thanks,Thanks!
    Where we can play your games?

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому +1

      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. 10 місяців тому

      @@AliElZoheiry Nice we waiting :)

  • @PRETTY_DOPE.
    @PRETTY_DOPE. 2 місяці тому

    hi thanks for the tutorial , its really well fleshed out and easy to follow had to sub
    regarding your parry system, is there a way i can make it that the the enemies attack has at parry window lets say with a notify state and if they are attacked within that notify state they get parried , it makes sense on paper but I'm not sure i know how to implement it to your AI system , Thanks for the help

    • @AliElZoheiry
      @AliElZoheiry  2 місяці тому +1

      Hey! Thanks for subscribing and I'm glad you found the tutorial helpful! For the parry system idea, you could use the same method applied for the player. In the animation you want to have a parry inside it, you can apply the same parry windows using notify states, and when the notify state is active, you set a boolean value (somethin like canParry) to true, and when the notify window is over you set it back to false. Then if they are attacked while that boolean value is true, you trigger a parry action

    • @PRETTY_DOPE.
      @PRETTY_DOPE. 2 місяці тому

      @@AliElZoheiry thanks for the reply , so I'm guessing ill have to add a function into the interface so that communicates the "canParry" bool to the player ? , ill go over it a gain and give feedback if it works thanks

    • @PRETTY_DOPE.
      @PRETTY_DOPE. 2 місяці тому +1

      @@AliElZoheiry Thanks i got it to work while also using a a defiance state

  • @sjrulz14
    @sjrulz14 9 місяців тому

    Great channel. Great mind. ❤ How did you learn all this?

    • @AliElZoheiry
      @AliElZoheiry  9 місяців тому

      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

  • @kellowattentertainment
    @kellowattentertainment 10 місяців тому

    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  10 місяців тому

      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

  • @mhahveergujjar
    @mhahveergujjar 10 місяців тому

    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  10 місяців тому

      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

  • @jiabinxiong72
    @jiabinxiong72 10 місяців тому

    太赞了!持续关注中...

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      我很高兴你喜欢它 🙏

  • @Im_pro_true16
    @Im_pro_true16 8 місяців тому

    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  8 місяців тому +1

      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 8 місяців тому

      @@AliElZoheiry thank you

    • @Im_pro_true16
      @Im_pro_true16 8 місяців тому

      ​​​@@AliElZoheirysorry but, another question, the parry button doesn't work how to fix that too?, thank you.

  • @serenityunreal5348
    @serenityunreal5348 28 днів тому

    When the player moves around while in the block montage, the sword snaps back to its non-block position in front. It's set to the UpperBody slot and the shield stays in its correct socket, but not the sword. Anyone have an idea why and how to fix it?

    • @AliElZoheiry
      @AliElZoheiry  25 днів тому

      Hey there, I'm not really sure I understand the issue, but if you're using the same montage I am and you're having trouble with the blending of the animation, make sure you have the same settings as I do in the Layered blend per bone node in the anim BP

  • @OiItsPhantom
    @OiItsPhantom 9 місяців тому

    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  9 місяців тому +1

      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 9 місяців тому

      @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  9 місяців тому +1

      @@OiItsPhantom No worries at all. Thank you for the suggestions, I'll consider your request 👍

    • @OiItsPhantom
      @OiItsPhantom 9 місяців тому +1

      @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 8 місяців тому

    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  8 місяців тому

      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

  • @angryralphs2516
    @angryralphs2516 10 місяців тому +1

    Hidden gem

  • @taylorroberts70
    @taylorroberts70 3 місяці тому

    Man why did I have to put my block in the animation graph 😭

    • @AliElZoheiry
      @AliElZoheiry  3 місяці тому +2

      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)

  • @sara-uh8xy
    @sara-uh8xy 10 місяців тому

    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  10 місяців тому

      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

  • @gamedevunity3dliviopanizzi170
    @gamedevunity3dliviopanizzi170 6 місяців тому

    great , for the combo the ia how i to do ?

  • @zuka9748
    @zuka9748 10 місяців тому

    amazing chanal

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      Thank you! glad you like it

  • @Сма_йлик
    @Сма_йлик 10 місяців тому

  • @prodl3rion
    @prodl3rion 2 місяці тому

    thanks soo much for this tutorial 🤍

    • @AliElZoheiry
      @AliElZoheiry  2 місяці тому

      You're very welcome! I'm glad you found it helpful. Thank you for the kind words and for watching! 🙏

  • @fostn
    @fostn 10 місяців тому

    This is amazing 🤍

    • @AliElZoheiry
      @AliElZoheiry  10 місяців тому

      Thank you. Glad you found it useful 🙏

  • @Vivekrathod2264
    @Vivekrathod2264 10 місяців тому

    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  10 місяців тому

      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 10 місяців тому

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