Smart Enemy AI | (Part 18: New Attack System) | Tutorial in Unreal Engine 5 (UE5)

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

КОМЕНТАРІ • 103

  • @storeboughtrocketgames2560
    @storeboughtrocketgames2560 7 місяців тому +12

    I don't know how you don't have 150,000 subscribers. These are literally the best tutorials on youtube.

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

      Thank you so much for your kind words! I'm really glad to hear that you find my tutorials helpful. Your support means a lot to me 🙏

  • @CosmicComputer
    @CosmicComputer 10 місяців тому +12

    You are and absolute LEGEND, so glad I found your channel. Thank you for putting up this intense work!

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

      Thank you Cosmic 🙏 I'm very happy to have you as a supporter

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

      yes,this is The best lesson in UA-cam.

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

    If anyone likes cats, you can see mine popup at 42:02 😹

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

      That cat is so serene!

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

      @@diliupg Hahaha she is indeed!

    • @gregorte
      @gregorte 18 днів тому +1

      You could set up your camera to fit a resting place of your cat in background into it, because people love small details unrelated to the videos topic :) Other channels I follow have it that way. Having some cat-video-bombs into serious topics is awesome!

    • @AliElZoheiry
      @AliElZoheiry  17 днів тому +1

      @@gregorte Hahaha thanks for the suggestion, that's a great idea!

  • @zymian
    @zymian 10 місяців тому +3

    Best UE tutorials on UA-cam! Thanks for your work!

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

      You're very welcome man, thank you for the support 🙏

  • @ZeliusDev
    @ZeliusDev 7 днів тому

    This series is absolutely Phenomenal! I would love to see a series from you about a leveling, stats/attribute system, classes and all rpg related stuff souly based on the player character. I would praise it like no tomorrow!

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

      Hey! Thank you so much for your kind words and your suggestions. I’ll definitely consider it for future videos. Stay tuned! 🙏

  • @RichardCastro-k8j
    @RichardCastro-k8j 10 місяців тому +2

    I'm a web developer, and recently started my journey in the world of game developer. I'm still in the part 3 and testing some things, learning and taking notes, but I like to see what is coming on, and I'm so excited to get at this point. You're a very good teacher and developer, I notice the good practices you are implementing. Good job in all senses!

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

      Very cool you made the jump to game dev from web dev, I did the same as well. Happy to hear that my tutorials are helping you 🙏☺️ I hope you enjoy the rest

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

    Loved the cat cameo. Amazing video as always, Ali!!

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

      Haha, glad you enjoyed the surprise appearance 🐱 Thank you for your support and kind words!

  • @Pizatol
    @Pizatol 10 місяців тому +3

    Great job, as always !

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

      Thank you as always Pizatol 😊🙏

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

    Oleee Ali as always impeccable, congratulations!

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

      Thank you so much for your kind words! I really appreciate your support and I'm glad you found the content helpful. Cheers!

  • @ぱっち-v9c
    @ぱっち-v9c Місяць тому

    内容がまとまっていてわかりやすいです!最高のチュートリアルをありがとう!!

    • @AliElZoheiry
      @AliElZoheiry  Місяць тому

      Thank you! I'm glad it was helpful 🙏

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

    Hi Ali Elzoheiry, there is a tutorial on the channel teaching how to put combat sound when combat starts, and when you eliminate enemies the combat sound ends and returns to ambient sound, and program enemies to appear when the player reaches a certain point . I would really like to learn this. Your channel is incredible, keep up the great work. Hugs.

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

      Thank you for your kind words and your suggestion! I'll definitely consider creating a tutorial on adding combat sounds and programming enemy appearances. I'm glad you're enjoying the content on the channel. Stay tuned for more tutorials! 🙏

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

      @@AliElZoheiry Your teaching is excellent, keep up the great work, and I look forward to your new videos.

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

    Awesome tutorial Ali.
    Before the boss, if you're out of ideas.
    1 - A wizard villain who can spawn enemies, (I imagine a type of creature that running with a normal
    attack or something that you want to adapt in the mechanics. (This could also be something from the
    boss if you don't want to create another enemy.
    2- Or Create the squire enemy that throws axes. Or creating both enemies all seem very promising for the series.

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

      Hey Jo, indeed I'm thinking of making the spawn enemies as a boss ability, still thinking about the details

  • @mikelkram
    @mikelkram Місяць тому

    Damn, this is the best episode😸

    • @AliElZoheiry
      @AliElZoheiry  Місяць тому

      Hey, thank you so much for your kind words! I'm thrilled to hear that you enjoyed the episode 😸 Your support means a lot!

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

    I am learning a lot from this tutorials, thank you for making them😁❤
    I will recommend this tutorials to my friends✌

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

      I'm really happy to hear that! Glad you're liking them so far 🙏

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

    The Tutorials just keeps getting better and better !!!...can you please add a spell/attack bar to the system...so one might be able to choose the attack/spell by licking with the mouse ?

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

      Hey Tom, I've been considering a combat system series, more focus on player attacks, and it would surely include an action bar in that series, so I will keep it in mind 👍

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

      ​@AliElZoheiry man that would be awesome. I'm struggling a bit with adjusting the enemy AI attacks to work with the main player.

  • @fyren9522
    @fyren9522 5 місяців тому +1

    Cool tutorial. What could be cool it would be flying ennemies who fly arround the player and shoot at him some projectiles or come to melee attack him but from the airs

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

      Thank you for the suggestion! That could be an interesting addition to explore in a future tutorial. Appreciate your input!

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

      @@AliElZoheiry Hello ali, A flying enemie could be very interesting, please take this @fyren9522 comment with consideration, thanks a lot !

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

    You speak, click and switch windows so fast. Awesome content as always.

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

      Hey Kasper, thank you, glad you're still enjoying it. I indeed start to do things faster the more repeated it becomes because people should already be familiar with these things by part 18 😂

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

    Amazing videos! Great job :)

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

      Thank you! Glad you like them 🤗🙏

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

    great as always!

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

      and thank you as always Patrick 🙏🙏

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

    protect this person

  • @muhammadzeeshannaeem1918
    @muhammadzeeshannaeem1918 Місяць тому

    Hello sir
    first of all , thanks for this epic series
    please help me how did you made this keep spinning mesh at specific pose in this montage ?
    42:43

    • @AliElZoheiry
      @AliElZoheiry  Місяць тому

      Hey! Thank you for your kind words about the series 🙏 I did the spinning mesh in blender by editing the animation itself to add some frames of the mesh spinning

  • @muhammadzeeshannaeem1918
    @muhammadzeeshannaeem1918 Місяць тому

    Thank you so much. You're amazing. i wish you could also share sounds for free

    • @AliElZoheiry
      @AliElZoheiry  Місяць тому

      You're very welcome! I appreciate your kind words 🙏 All the sounds I got from freesounds.org

  • @MrMeat570
    @MrMeat570 Місяць тому +1

    Hey there, i got a question, i dont want to do a spinning attack for my enemy, if i just skip the spinning attack part in this episode and the spinning attack episode, it shouldnt effect the boss fight right? cuz i know the boss has an axe that spins so will i need it for that or am i chillin?

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

      Hey! If the spinning attack doesn't fit into your boss fight, you should be good skipping that part. You won't need it for the boss with the spinning axe. Go ahead and adjust the tutorial to fit your needs!

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

    Please, can u help me? How can i make to several AI walk in random points, and whet i press 2, closest one starts to chase me?
    P.S. I made first part, with walking on random points, but can't understand how to make second

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

      to get the closest enemy, you can get all actors of a specific class, using "GetActorsOfClass" node. Then use "GetDistance" node to calculate the closest one

  • @A.D.A.M.411
    @A.D.A.M.411 8 місяців тому +1

    First You're an amazing teacher! Second for some reason both the basic attack and barrage are only performing once and then he doesnt move. but debugging myself i see that the ground slam works fine hooked up as the only attack but none of the others. and i think i found out why (the attack variable is false everytime after the first time and idk why) all code seems correct and was working.. If you have a sec please help

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

      Hey Adam, thank you, I'm glad you found this useful.
      If you're having issues with just some attacks, make sure that you're calling AttackEnd correctly and at the right time, and that you are passing the correct AttackTarget to the attackEnd function

    • @A.D.A.M.411
      @A.D.A.M.411 8 місяців тому +1

      ​@@AliElZoheiry Wow Thank you I had my "Attack Target" and "Target" on the "Attack End" that is hooked to the "Get Owner" switched so "Attack End" wasn't getting called so you were right!! Wow I am so stoked now i can finally move on to the next video but i also want to tell you that you are by far the best at explaining the meaning and flow of what is happening in the code and to the point that i feel like i understand and that's a good feeling so please never stop teaching and helping us dreamers... :)

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

    Great as always Ali. Can you please tell us how did you manage to make the animation itself to spin?

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

      You're very welcome 🙏 I just edited the animation in Blender to make it spin

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

      You can make a new task called BTT spin mesh, cast it to melee AI and then call the spin mesh Custom event, and then call that task in the Melee Behaviour tree, it worked for me.😁

    • @Tenchinu
      @Tenchinu 26 днів тому

      @@nwhajlawn6224 at what point did you called the new BTT_Spin? calling it independently doesn't connect it to the BTT_MeleeAttack that the spin is connected to

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

    Hey Ali! Thank you for updating the attack system, it's going to be so much easier creating new enemies after I finish this tutorial. I am having an issue that I have been stumped on for about an hour. For the ground smash attack, it works for the melee enemy but not the mage enemy. I get an error pointing me towards the "BTT_MageAttack" "Ground Smash Attack" function, so I placed a print string and that works fine. Also, in the Behaviour Tree, it gets stuck on the "Ground Smash Attack" unless I hit the enemy. Would you have any ideas what's happening with the mage enemy?

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

      Hey there! Thank you for your comment and your support! Unfortunately I don't really know the reason for your error, but I'm sure you'll figure it out with a bit more debugging

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

    Thank you

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

      You're welcome! I'm glad you found the content helpful. Thank you for the comment! 🙏

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

    Thank you for your awesome tutorial videos. If the player character uses the ground smash attack skill, I would like to implement a smart behavior where the enemy recognizes the skill range in advance and runs outside if it is already within the skill range, and does not go inside if it is outside the skill range. How should I implement this? I've been thinking about it, but I think it would be better to create an actor with the same shape as the skill range before the skill is cast, remove the actor's collision and make it invisible, but the enemy recognizes it in EQS and runs away. I would be happy to hear your opinion.

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

      Hey Morphe, You're very welcome, glad you liked it!
      Regarding your question, I haven't tried implementing that, but he's how I would go about doing it:
      - First, I'd try to make the behavior of the enemy generic and not tied to a specific attack
      - I'd do that by having 2 additional blackboard keys (or just one struct) something like "DangerRadius" & "DangerCenter"
      - This will mark any area that the enemy should avoid for example
      - Then, in the behavior tree, I'd have a blackboard decorator that checks if the value of DangerRadius and DangerCenter are valid then there's danger to avoid
      - I'd need another decorator to tell me if the enemy is currently inside the danger area
      - If true, then find a point outside the danger area and run out
      - Then, the last thing to do, is just set the values of DangerRadius & DangerCenter when the player does an AOE attack
      - My preferred way for doing that, is dispatching a custom event from the player that contains all the info of the AOE attack
      - Then I'd bind to that event in the AI controller of the enemy and set the blackboard values when it is dispatched, and unset the values when it's over
      This is all speculative though, I haven't tested any of it

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

    Best UE AI tutorials .....make a grab, please

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

      Thanks Roger, I appreciate you. I'll consider your suggestion ☺️🙏

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

    Awesome stuff! Do you think you'll add status effects? I think it will pair really well with the new attacks like applying shock to the player if hit with the lightning attack

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

      Hmmm... Haven't really considered it, since that will be purely related to a combat system and not really enemy AI, so might be part of a separate series, or a tutorial on its own

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

      @@AliElZoheiry Thanks for considering. Awesome work, sorry if I sounded demanding, but I want you to take your time. I love to see how other people implement different systems. Thank you again for your awesome content

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

      ​@@sayayuuki127no worries at all, you didn't sound demanding. I've gotten some very demanding comments before, people go as far as asking me to do something specific before a specific date because they have a deadline 😅 and they get upset if I say i cant. now that's demanding 😂

  • @albi-tz4dj
    @albi-tz4dj 3 місяці тому

    erbut in the project there is only the animantion for the anemy or ther is also something for the player because i have dowload it but there is only the movement for the enemy or boss the player has nothing

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

      The project contains everything in these tutorials, i uploaded the same files i worked on in the videos, so all the player stuff is there as well

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

    Please help.if i want to make a new melee enemy,i make a child from the melee enemy ok? I make a spider enemy everything good. But when i attack him there are moment that looses health from my attacks and other times that not loose.what can be the problem?

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

      Hmm... not really sure, it could be anything 😅 I suggest adding some print statements in that flow and see what points it prints and where it fails

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

    I want to ask where did you get the sound effects for the mage enemy ground smash attack? Any good websites recommendation?

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

      Hey there, most sound effects I get from freesound.org/

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

      ​@@AliElZoheiry thank you very much Ali, your youtube tutorials definitely help me so much to understand Unreal Engine as I started just like a month, hope more people can discover your channel.

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

      You're very welcome ​@@tenvyyap9051 and thank you for the support 🙏☺️

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

    At 42:35 how did you make the mesh spin in anim montage? i tried looking for a tutorial but couldn't find anything, Pls Help

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

      Hey there, this wasn't done in engine, this was just done by editing the animation itself in Blender. I am not a 3D artist nor an animator, so I didn't add that part in the tutorial, but it was very simple, if I can do it, anyone can ;)
      I just opened up the animation in blender, copied the last frame, rotated it multiple times and pasted it a few frames later to make the animation longer

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

      @@AliElZoheiry you should’ve mentioned it in the vid before deleting the spin mesh 💀, but its alright no big deal.

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

      You don't need to use blender, I simply moved the timeline to the base enemy for the spin, cast to base in bpc enemyattacks, start the timeline and let the base spin the mesh, then call stop timeline from the bpc enemy attacks on the stop spinning function, and go about it that way. The only thing is that you can't also use this spin, but u could fix that in other ways but I was lazy and didn't want to use this ability anyways on my own character.

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

    Thank you for your tuts! I have a question about how to use the EQSresult in blueprint without using behavior tree?

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

      You're welcome 🙏 There's a blueprint node you can use called "Run EQSQuery". This is an async node though, so you have to bind to it's finish execution task and get your result. Here's an example in this screenshot prnt.sc/yWUOyvwOYpZ8

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

      @@AliElZoheiry Great thanks, why must bind the event?i just use the return value to get results but it seemed not working

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

      @@PiPiCatStudio because it's an async function, meaning that it doesn't finish instantly and takes sometime, so you need to bind to the event that is dispatched when that time is done and the locations are ready

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

      @@AliElZoheiry i see isee !!!great thanks!!!

  • @MartoGolemeca10-hf3gi
    @MartoGolemeca10-hf3gi 8 місяців тому

    hi, how did you made the spinning to be part of the spinning attack animation montage?

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

      I just edited the animation in Blender, repeating the last frame for a few seconds and making it rotate, so now it's part of the animation itself

    • @MartoGolemeca10-hf3gi
      @MartoGolemeca10-hf3gi 8 місяців тому

      @@AliElZoheiry can i just use the spin functionality we did in the spinning attack tutorial

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

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

      🙏🤗👋☺️😊🐱🙂

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

    Please make a boss fight like souls games

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

    ما عندك قناه عربيه

    • @AliElZoheiry
      @AliElZoheiry  Місяць тому

      Thank you for your comment! I appreciate your interest. I'm currently focused on providing content in English, but I appreciate your feedback.

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

    thank you so much