Smart Enemy AI | (Part 14: Mage Enemy Continued) | Tutorial in Unreal Engine 5 (UE5)

Поділитися
Вставка
  • Опубліковано 18 чер 2024
  • Learning Goals:
    1 - How to create an enemy from scratch with a custom mesh and anim BP
    2 - How to create a magic attack ability
    3 - How to create a teleport skill with cool VFX
    4 - How to create a heal AOE ability
    5 - How to conceptualize the behavior of a new enemy (Using Behavior Trees)
    6 - How to setup a teleport EQS that teleports behind the player
    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 "AOE" tutorial:
    • How to do AOE damage a...
    Link to the "Damage System" tutorial:
    • How to Build a Combat ...
    Checkout my other tutorials on my channel:
    / @alielzoheiry
    Chapters:
    00:00 Outcome of This Part
    00:39 Explaining The Desired Mage Behavior
    02:19 Translating The Desired Behavior to the BT
    05:27 Creating The Teleport EQS
    14:08 Fixing Attack Behavior
    20:40 Creating The Heal Functionality
    43:46 Fixing Bugs
    45:28 Outro
    Assets used:
    Paragon Gideon VFX: www.unrealengine.com/marketpl...
    FX Variety Pack: www.unrealengine.com/marketpl...
    Mixamo Character: www.mixamo.com/#/?page=1&quer...
    Mixamo Animations:
    Standing Idle
    Standing Walk Forward
    Standing Walk Back
    Standing Walk Left
    Standing Walk Right
    Standing Run Forward
    Standing Run Back
    Standing Run Left
    Standing Run Right
    Fireball
    Female Ninja running jump
    Standing 2H Magic Area Attack 02 (For the heal montage)
    Hit Reaction From The Right With Axe
    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 and love of 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 UA-cam 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 #behaviortree #eqs #mage #teleport #magic #combat #enemies #spell
  • Ігри

КОМЕНТАРІ • 68

  • @mebessusn
    @mebessusn 2 місяці тому +4

    This series just gets better and better. You're an excellent teacher.

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

      Thank you so much for your kind words! I really appreciate your support and I'm glad you're finding the series helpful. Keep watching for more great content!

  • @PaulHousego
    @PaulHousego 8 місяців тому +2

    Thanks Ali for this Part two. Keep up the fantastic work. cheers.

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

      Thank you as always Paul 🙏 I appreciate your support

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

    It really feels satisfying watching your progress in unreal. Amazing, keep increasing your skill and confidence. Also i love the way you teach in whatever form you make it, it can never go wrong with your personality and teaching logic
    I kinda wish i can work with you in a project XD.

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

      Thank you so much for this kind comment, it really motivates me to hear that, I appreciate you and your support 🙏 😊

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

    Thanks Ali! It's really fun to build these tutorials you are creating.

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

      You're very welcome! Glad you're enjoying them ☺️🙏

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

    Thx Ali. Awesome Part Again !

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

      Thank you ezelrza ☺️🙏 glad you liked it

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

    continue, your videos are awesome !

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

      Thank you Tom, I definitely will continue 🙏

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

    Tried watching other AI tutorials in between these and I just couldn't. They weren't nearly as informative or gripping as these. Really looking forward to the rest to come.

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

      I really appreciate you Dustan, and I'm very happy that you find my content useful. I spend a lot of time on each video to make sure it's educational and fun, so I'm happy that you see the value 😊🙏

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

      @@AliElZoheiry well I can tell you I have learnt more these past two weeks of your videos than the past 3 years I've mingled with UE. Looking forward to what's next

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

    You really fantastic person! Really I am so appreciative your amazing tutorials!
    Thank you so much

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

      I wish you all the best! You are fantastic person

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

      Thank you Roy 🙏 I appreciate you

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

      @@AliElZoheiry No problem. I am really so gladly

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

    As usual, excellent teaching quality!
    I find that you have a methodical and "organized" side when you make your blueprint code, which is really handy for following the tutorial!
    Thank you very much for this video Ali Elzoheiry! on the other hand...
    The sound of your spell traumatizes me a little, it reminds me of your mini game XD, I tried to get closer to your score but without success haha!

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

      Wow, again thank you Shizuma, I always love reading your comments, really glad you liked it.
      P.S if you the sound is too traumatizing for you, send me a new one and I'll change it hahaha ;)

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

    yes, bossss fight, I subscribed because of that!!

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

    Loving your videos! Just a quick tip. I added a "debug" variable to the EQS Testing Pawn. That way I just need to tick the box to switch logic instead of messing with the code every time. Hope this helps.

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

      Thanks for sharing that tip! That sounds like a useful way to streamline the testing process. I appreciate your support and feedback!

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

      One more tip. I put the EQS pawn on Team 0 and added logic to ensure team 0 is always on the same team. Also had to change a bit of logic on set mode to attacking to ignore team 0... now I can leave the EQS pawn anywhere and just toggle the debug flag.@@AliElZoheiry

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

    Hi, really love all the work you did with this series and also on the other videos on the channel, can@t wait to finnish the series and also implement some other things from your videos.
    I have a question what if I want (the mage enemy) to start first attacking me then move to an other ideal position and attack again, or keep staying in that place if the range to the target is "safe" enough do don't run or strafe (for exemple Player is fighting a Melee and Range enemy dont need to strafe because is safe in his position).

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

      Hey there! Thank you for your kind words and support. To achieve the behavior you're describing for the mage enemy, you can combine the attack and movement logic within the behavior tree. You can decide based on the distance to the target whether the mage should prioritize attacking or repositioning. Additionally, you could include a condition in the AI logic to determine whether strafing is necessary based on the threat level. I'm glad you're finding the series helpful and best of luck implementing these features!

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

    Thank you for the tutorial, i want to ask is it possible to combine the findcover eqs from ranged enemy to the mage one, so it escapes first, heal, then back to focus on player. i tried to just plug and play and it doesn't work xD

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

      Yeah it's definitely possible. but there's a bug now with the findCover, after implementing the "Seeking" state. because when the enemy goes to find cover, they lose sight of their target, and that triggers them to go into the "seeking" state, until they see their target again, then they go heal, and they get stuck in a loop :D I'm planning on fixing that soon, but until then, if you want to use the cover with the mage enemy, you'll have to fix that bug as well

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

    Hey Ali, quick question about the proper way to think about the bind/unbind to events. @ 20:07 I noticed you don't UNBIND event from On Attack End before Finish Execute like you did for Unbind Event from On Teleport End. Was this because it's just a tutorial or would doing so cause attacks to end too quickly without a delay elsewhere?

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

      Hey Justan, good that you mention that, it's a very good question.
      For best practices, it's always recommended to unbind from an events that are registered multiple times (like this one is registered on every attack) so for best practices, I should indeed be unbinding.
      That said, since there can't be a case where one attack begins while another attack task is being executed I ignored the unbind because all it will do is trigger a "finish execute" on a task that isn't running, so it won't really do anything, but again, for code cleanliness I should unbind from these as well

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

      Thank you for the explanation, I still have much to learn in general but this series has sped things up in more ways than just AI behavior. I drop likes during every intro because I know every vid is a banger. @@AliElZoheiry

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

    Absolutely incredible, I just want to ask one thing about the healing part of mage. You have put Heal Task in the Attack State, so Mage never heals unless it goes in Attacking state, Shouldn't it be of more priority then Attack functionality?
    Haven't gotten to next part of series yet, maybe fixed there, let me know if it is. Thanks again for awesome tutorial.

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

      Hey there! Thank you for your support and feedback. You raise a good point about the healing functionality, it can indeed be its own state, but then you'll have to handle automatically going back to the attack state after healing and keeping track of the attack target even when in the healing state.
      So it's some more work, but might be cleaner if it suits your game.

  • @leof.2695
    @leof.2695 8 місяців тому

    Forgive me if you already covered this, but can the enemies (ESPECIALLY the melee ones) chase while attacking and perform random attacks? I don't remember you ever covering animation layer blends.

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

      Wow it's very funny that you would mention that now. I'm currently editing the video of my next tutorial which includes how to do animation blending 😅 so tomorrow you'll get to see that in part 15 😉

    • @leof.2695
      @leof.2695 8 місяців тому

      @@AliElZoheiry Oh, that's just phenomenal then...

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

    I might have missed this, but where is the 'BTD_IsBelowHealthThreshold' designed? Watched older A.I videos and the AoE video yet cannot find it :(

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

      Hey, this was added in part 6, to allow the ranged enemy to find cover, heal and then come out after healing. You can find it here ua-cam.com/video/18Awm1RYNMk/v-deo.htmlsi=OpyjUEg45ouD571F&t=2053 (link starts at timestamp 34:12)

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

      @AliElZoheiry Thank you so much! Loving your video series so far, it needs way more views.

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

    Though the mage enemy derives from ranged enemy after completion of this section, my mage spends a lot of time in the frozen state. Everything else works fine. what could be the problem?

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

      Hey Diliup, I replied to you on Discord

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

    does behavior tree able to limit the usage of certain task? let say the mage is only allowed to use the heal function for 2 times

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

      Hey Brad, behavior trees are generally driven by the values of the blackboard, so if you have a blackboard value that tells you whether or not you can use a certain ability or not then you can definitely have the behavior tree do that

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

      @@AliElZoheiry ah i see, thankyou for the answer

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

    Yo take a look at the Asset: Combat Fury
    Maybe u can take it apart its a very good combat system that costs 200$
    But i want to learn how to do stuff like this

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

      Hey, Yeah I saw Gorka Games just made a video on it, it looks pretty cool, I’ll test it out later and maybe take some elements from it

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

    Please forgive me.
    Ali when you making damage system for player? I am mean I can damaged multiple enemies?

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

      Hey Roy, the damage system already supports player and enemy and can damage multiple enemies

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

      @@AliElZoheiry I am really so sorry what's is part?

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

      @@AliElZoheiry maybe I miss this part

  • @kevensantos-prf
    @kevensantos-prf 8 місяців тому

    Hello master, I'm following all your tutorials with great appreciation, I'm trying to create an Enemy using your AI system, could you create an enemy that Parrys and counterattacks?

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

      Hello Keven, thank you for the support, I appreciate you 🙏
      The damage system I have in place supports parrying, so it won't be that different from the block functionality we have in place, but I will probably be introducing the parry functionality in one of my later videos

    • @kevensantos-prf
      @kevensantos-prf 8 місяців тому

      @@AliElZoheiry Thank you very much for your feedback, I will be eagerly awaiting more tutorials

  • @user-kk5xj3ey6m
    @user-kk5xj3ey6m 8 місяців тому +1

    I've been wondering if you still thinking about ai can open doors and clamp the ladder

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

      Hey, I'm definitely considering all non-combat AI behavior, but I have to finish the combat tutorials first

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

    Right now I am needs boss fight melee enemy!

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

      Coming soon hopefully 🤞

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

      @@AliElZoheiry Amazing! I love you my dear friend.
      I am so gladly Dante recommended your tutorials.
      I am buying AI from marketplace but, this AI not good workings but, your AI amazing

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

    Hi. Anyone knows how can I make the mage enemy to not damage melee and ranged enemies? (Mage can still damage those even if they are on the same team). Thank you

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

      Hey ZRM, I answered on Discord, I hope it helps 🙏

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

      Yep, got it. Thank you @@AliElZoheiry

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

    I was having an issue where my mage wasn't teleporting as fast as Ali's. I'm in 5.3. I might have missed it if he did this in his, but I had to go to the character movement component and turn the "Braking Deceleration Flying" up to a higher number. 50000 works nicely. I also noticed if I put it too high (99999) it would occasionally get stuck at the end of it's teleport invisible for a few seconds. Just putting this here in case someone had the same issue!

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

      Nice! Thanks for the addition, it might help someone indeed 🙏

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

      Thanks! I tried to fix that too and I gave up. 👌

  • @user-xb1jc7lf8x
    @user-xb1jc7lf8x 7 місяців тому