Smart Enemy AI | (Part 11: Group Enemy Combat) | Tutorial in Unreal Engine 5 (UE5)

Поділитися
Вставка
  • Опубліковано 19 чер 2024
  • Learning Goals:
    1 - Create a token system that allows you to coordinate a fight between multiple enemies at once
    2 - Increase or decrease the difficulty of a fight based on the number of tokens
    3 - Achieve a more predictable fight by ensuring that enemies communicate with each other before attacking (through tokens)
    Note:
    This token system is a simplified version of what "Doom" does to control the flow of battle and increase/decrease difficulty. You can mix this approach with a "priority score" that assign an attack priority to each enemy depending on the factors of your game (Like how close they are, or if they have a powerful attack ready) then you can mix this priority score with the token system for a more advanced approach
    Link to my Patreon (Thank you for your support)
    / alizoh
    Join my Discord server to chat and mingle with the community
    / discord
    Link to part 1 of the "Smart Enemy AI" tutorial:
    • Smart Enemy AI | (Part...
    Link to the "Damage System" tutorial:
    • How to Build a Combat ...
    Link to the "Projectile System" tutorial:
    • How to Shoot Projectil...
    If you would like to support me on Patreon, you will get access to all the source code from every video I post as well as any custom assets that I create. Also I would be forever thankful to my early adopters
    / alizoh
    Checkout my other tutorials on my channel:
    / @alielzoheiry
    Chapters:
    00:00 Outcome of This Part
    02:03 Add Increase/Decrease Tokens to Damagable Actor
    09:40 Set Tokens Count for Player
    10:18 Enemy Checks Tokens Before Attack
    14:42 Explaining What Needs to Change
    16:03 Refactoring Enemy Attack Functions
    29:20 Refactoring Melee Behavior Tree
    38:43 Updating AI Controller to Prevent Enemies Colliding
    39:46 Refactoring Ranged Behavior Tree
    45:37 Final Test
    47:02 Return Tokens on Death
    49:15 Next Up In Part 12
    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 #tokens #doom #group #combat #multiple #enemies #coordination
  • Ігри

КОМЕНТАРІ • 162

  • @mrroody3381
    @mrroody3381 4 місяці тому +8

    you've earned yourself a new patron with this goldmine of information for current & future game devs, keep up the outstanding work :)

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

      Thank you so much for your support and becoming a patron! I'm thrilled that you found the content valuable, and I'm looking forward to providing even more useful information for game devs in the future!

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

    Love watching your tutorials, I didn't even plan to add a token system but I still watched all of this video. I still implemented the Jump Land Move to fix and changing the parent class for the AIController because I plan to have a lot of enemies to fight against at the same.

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

      Hey, thank you for your kind words! I'm really glad to hear that you found the video useful. Best of luck with your project, and feel free to reach out if you have any more questions along the way!

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

    This is just exactly what I needed. Thanks a lot man, keep it up!

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

      You're most welcome! Glad you find it helpful, I'll definitely keep making more 😉

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

    Great video Ali. Finally completely caught up.
    I was about to suggest the AI teaming when I got to your outro, so I'm looking forward to next video!

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

      Thank you! And indeed the teams part is needed for nice group combatn

  • @user-it4ws3yx2f
    @user-it4ws3yx2f 10 місяців тому +1

    Great thanks to your tutorials! Always being helpful!😃

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

      You're welcome! Very happy that you found it helpful 🙏

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

    Amazing content as always. Thank You! I'm always looking forward to future content, and team combat sounds like it will be a lot of fun :)
    Until then. Stay Blessed 🙏

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

      Thank you so much! I'm also really happy with the direction this is taking, I hope it continues to be useful 🙏

  • @DOMINATOR-qv6yv
    @DOMINATOR-qv6yv 10 місяців тому +3

    Thanks bro for this ! I am working on my RPG PROJECT as a Indie Developer! Which consists of different clans that's why I needed this tutorial to make fight between player and the other clan members on their ability!

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

      Awesome! Glad I could help 🙏

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

    But what an incredible video, the relevance of the tutorial, the pedagogy, the patience, the quality, each video is an appointment not to be missed.
    I'm really happy, because this kind of mechanics is really useful honestly, it helps me significantly for my project, and especially to understand!
    It's so satisfying to see your AI evolve, to see it jump, to see it group attack, it's really gratifying haha!
    Thanks Ali, thanks for your videos!

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

      Thank you so much Shizuma, as always, your support means a lot to me 🙏😊

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

      @@AliElZoheiry so instead of using this token system we can do like each enemy to have certain amount of time untill next attack (2-3-4-5 sec) in the BT so then enemys attacking same time or random right? what will be the diffrence betwin this and that case?

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

      ​@@MaxStudioCG2023Hey, so we do we use both a cooldown on the enemy attacks as well as this token system, it's not one or the other, because they both work together, when the enemy cooldown (or timer) is up, then they check if they can attack or not (based on the token system) and if not then they wait and check again later

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

      @@AliElZoheiry yes but can work without this token system too ....im saying we can just use the cooldown without this token system and works kinda the same (for example 1enemy have cooldown 2sec and other 5second ...or 2other enemy same cooldown and kinda will work the same as the token system i think coz then they attacking random or both same time ) .....

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

      @@MaxStudioCG2023 it will be a very rigid system that doesn't scale with the number of enemies, or number of attacks or different cooldowns, it will cause a lot of timing problems, and multiple enemies could be on cooldown at the same time, then no one is attacking, so it's really not scalable and advise not doing that 😅

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

    Great. Thanks again for a truly magnificent tutorial.

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

      My pleasure, and thank you for the support as always 😉

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

    This is the tutorial I expected for make my beatem up, thx.

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

      You're welcome! I hope it helps 🙏

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

    Very well explained, like always🙌

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

      Thank you for the support as always 🙏🙏

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

    (new google account, old one was nightmare or smth)
    I've been moving onto my own projects so im still stuck on number six, but this is an incredible series. it helped me get off the ground for a ton of recreations of games, and gave me the courage to attempt to remake the fnaf one entire game. thank you so much for these videos, we love it.

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

      I'm very happy to hear that. Glad that this is helping you, and thank you for watching as always ;)

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

    10/10 perfect tutorial as always

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

    Quite an interesting idea with using tokens for the AI to use. I like it.

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

      Thank you! I can't take credit for the idea though, I read it in a dev log from "ID software" (the developers of Doom), so I tried to create something based on that

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

      Do you still have that devlog link? I’d like to know more about the system.

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

      ​@@viniguerrero I believe it was this one ua-cam.com/video/RcOdtwioEfI/v-deo.htmlsi=eBPglxzouXJYaHZ3

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

      Thanks a lot @@AliElZoheiry ! This is quite an interesting subject

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

    😂😂YESSIR this was exactly what i needed thanks again for this Ali

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

      My pleasure! Glad you found it helpful 🙏

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

    Terrific tutorial as always and im loving it so far. Saw it mentioned previously but I also notice the Ai controller as detour breaking the navlink proxy. seems the colliding with the edge of the surface they want to jump up to causes them to just jump up and down continuously. 5.3 as well. Likely a bug but thought I would mention it anyway.

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

      Hey there, thank you for watching and commenting, really glad you're finding this useful. Regarding the navlink and AI controller. There is indeed a bug with v5.3+ with the detour crown controller, I haven't used 5.3 myself, but I heard that from a lot of people. So if you're on v5.3, I suggest using the regular AI controller parent

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

    Dude, do you know how long I was stuck tring to get my enemies to not block each other?! You are a life saver!!

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

      So glad to hear that I could help you out! Happy to be a life saver 😉

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

    yesssss!!!! at last! hehehe many many Thanks

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

      You're very welcome! Hope you enjoy it 🙏

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

    Thanks crazy Tutorials that u make with them i can make a good ai system PVPVE game Thanks thanks thanks!!!!! juuuhuuuuu 😄
    I must support this!!!

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

      You're very welcome 🙏 and thank you for the support, I really appreciate it

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

    amazing!

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

      Thanks! Glad you enjoyed it 🙏

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

      @@AliElZoheiry thank you!!!!!! i havent even refined the ai and it already beats some mainstream games, im used to playing skyrim and this is already a big leap, rdr2 is very realistic but the ai is pretty simplistic also. when it comes to combat i mean

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

    Hi, Ali! Just wanted to say that you content is amazing. Did you know that in functions instead of pulling from inputs you could just type get "variable name" so blueprints will be cleaner?

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

      Hey there! Thank you for your kind words, I did indeed know that, but often I avoid it because then I have to read the full function to see where the variable is used, whereas if I use it from the input pin on the function name, I can easily track where each input has been used, but definitely useful when you have to use the same variable multiple times in different places. I appreciate your support and I'm glad you're enjoying the content!

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

    Such good tutorials, I wish there were more C++ based ones of this quality...

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

      Thanks for your kind words! I'm glad you're enjoying the tutorials. I'll definitely consider creating more C++ based tutorials of similar quality. Thank you for the suggestion and your support!

  • @andrewvanderwalt8494
    @andrewvanderwalt8494 10 днів тому

    Again a great tutorial Ali! When the AI dies how do you have them unequip their weapon so you don't end up with lots of weapon geometry end up in the env when they die?

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

      Hey there, glad you enjoyed the tutorial! I haven't really covered death properly in this series, but generally speaking, you should either remove the entire actor after a while to free up some memory and not render unneeded actors. Or if you want to keep the mesh, then you should indeed consider what to clean up to make the game as performant as possible

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

    很赞,加油

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

    Hi Ali, thank you very much for your work and for sharing your knowledge. Do you think it is possibile to explain us a cover system for both player and enemy? Not something that works with tokens that you have to manually place all around the map, though. That kind of cover system is very time consuming. Thanks in advance

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

      Hey Giovanni, you're most welcome 😁 I briefly explained how to get an enemy to hide or take cover where the player can't see them (to go heal) in this video here ua-cam.com/video/18Awm1RYNMk/v-deo.html but I'm not sure if that's what you're looking for

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

    Bro is high af 7:16 but still pulls of one of the most useful vids

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

      Hahah, glad you found it useful! Thank you for watching and commenting 🙏

  • @user-bj8bs3rg5q
    @user-bj8bs3rg5q 3 місяці тому

    Еще раз Большое Спасибо!

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

      Конечно, не за что! Я рад, что вам было полезно!

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

    Love the series! Just posting as FYI (in case anyone else has similar issues)... When you switch the parent class of the AIC from "AIController" to the Detour AI Crowd Controller, enemies stop using the Nav jumps properly. They just jump straight up, in place. When I switched the parent class back to "AIController", they jump forward as they did before. Not sure if this is a bug (currently on v5.3) or if this is something that is addressed in a future video.

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

      Hey Kyle, thank you for your comment. I haven't tried this in 5.3, but in 5.2 it works well

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

      Im on 5.3 and this is also an issue for me. Must be something that changed with the system

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

      im also having this issue in 5.3

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

      Same. I’m trying to fix it.

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

    AWESOME🎉🎉🎉🎉🎉🎉🎉

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

    Esto es otro nivel apenas y sigo el ritmo 🥲
    This is another level barely and I keep up 🥲

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

      I'm glad they're helping you 😊

  • @jacoposcala7170
    @jacoposcala7170 Місяць тому +2

    Hello! Late on this series but amazing course so far, i'm new to Unreal coming from Unity :)
    I noticed an issue, when refactoring parent class to DetourCrowd the enemies are not jumping correctly anymore (they jump on place), i believe they're trying to avoid every collision so they don't want to get on platforms and drift back

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

      Hey there! Thank you for your comment, and I'm glad to hear you're enjoying the course so far! That's a weird bug. I haven't encountered that before to be honest.

    • @ambvil3222
      @ambvil3222 19 днів тому

      @@AliElZoheiry Hello Ali, thanks for this AiSerie, I have the exact same problem here,my enemy is jumping in place.

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

    So, which Doom uses the token system? Is this from the original Doom or is this system used in Doom 2016?

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

      This video explains the token system in Doom 2016 ua-cam.com/video/RcOdtwioEfI/v-deo.html but it's also possible that it was used in the original one as well.

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

    I love your teaching style and the tutorials are amazing btw. Im having an issue with this one, my melee enemy changes the values of the tokens, somehow taking more and more away or adding more and more tokens.

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

      Thank you BooneyianLogic, glad you're liking the tutorials.
      Here are some things to check to debug your issue:
      - If you are setting the TokenCount of an attack to "0", make sure that the variable called "TokensUsedInCurrentAttack" has a default value of "0" as well (this is in the base enemy class)
      - Make sure you are calling AttackStart & AttackEnd on every attack, and that they are not interrupted in the middle
      - Add breakpoints in your attack functions to trace the execution flow to see where it goes wrong.
      Hope this helps.

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

      thank you very much for the reply. i will look into breakpointing the token system to ensure it works, i still dont know what i did to my jump function, when they jump they seem to not move in any direction except upwards, in both the sword jump attack and the navlink jumps.@@AliElZoheiry

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

    🎉🎉❤❤

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

    Thanks for the tutorial on this! For some reason when I implement it into my setup (Just the token getting and returning section), it works successfully until I start to kill enemies then I always end up being stuck with 0 tokens to give. Any idea as to why this could be? Been trying to troubleshoot it with no luck.

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

      Of course as always after asking a question I figure it out. I wasn't deleting the actor and wasn't setting to stop trying to attack after dying, so it would still reserve the tokens. It wasn't a noticeable issue before as the enemy was just dead on the ground visually.

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

      Awesome! Glad you found the issue 😉

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

    Which version are you using ?

  • @user-wk8qo7ul8s
    @user-wk8qo7ul8s 9 місяців тому

    This methods also improves profromance compared to all the attack all at ones ?

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

      Doesn't really have an impact on performance compared to without this system

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

    Good work brother will you make tutorial about block the gun attack with sword

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

      Thank you 🙏 and I already made a tutorial on blocking gun attack with the sword in this video ua-cam.com/video/84upuVN6s1Y/v-deo.html but I will be improving it and fixing some bugs in a later video

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

      @@AliElZoheiry wow you are the best thank you

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

      @haythembenhaddada9988 I just wanted to give you a heads up that I will be improving the block gun attack behavior in my next video, so it will build upon the video that I shared with you in the comment above, but I will make some improvements to it, in the next video (Part 12)

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

      @@AliElZoheiry thank you brother your videos are amazing and very helpfull god bless you

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

    interesting tutorial, I'll keep it for my work.
    is it possible to make a series not with a default mannequin and animation blueprint?
    I would like to use it, but I have my own, non-standard models and skeletons for them.
    thanks.

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

      Hey Dina, I'm using the default Mannequin because what applies to the Mannequin can apply to any other character, it won't really make much of a difference if you use your own characters, especially since I'm using custom animations as well

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

      @@AliElZoheiry Unfortunately, I don't understand the engine well enough yet, but thank you. I will try to combine this tutorial series with some other one where it is described.
      Another question, can you make a tutorial on the possibility for AI after he runs up to the player character to attack, walk around this character trying to get behind him?

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

      Well I have shown the strafe functionality and how to use the EQS to get the enemy to position themselves around the player in a specific way in this tutorial ua-cam.com/video/Oy_LojjRiWo/v-deo.htmlsi=XjA6Rz6dkWrROnLv So using the same concepts you can get the enemy to move behind the player

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

      @@AliElZoheiry thx

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

    I'm using v4.26 and I can't find the "Delay until next tick" node. Was it added in unreal version 5?

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

      Not sure when this node was introduced, but doing a regular delay with a very small number does the same, I think even a delay with zero will still wait till the next tick to trigger

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

    Hello, could you please guide me where you found info about how Doom designer theirs bots?

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

      Of course, This video explains the token system in Doom 2016 ua-cam.com/video/RcOdtwioEfI/v-deo.html

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

    Hey Ali, thanks a lot for this tutorial series. Perhaps you could show how enemies can surround the player, attacking him from all sides, for example (attack formation) In my solution I used EQs to create a point circle around the player and then the ai would walk to a point if it isn’t occupied by another ai. It sort of works, but I have the feeling that I hacked the code together and my solution isn’t very smart. Perhaps a topic for another ai tutorial?

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

      You're very welcome, glad you like it so far.
      Thank you for the suggestion, it's a pretty interesting topic, and I think your solution is not bad. I would tackle it in a similar way.
      If you want to try different solutions to see which one is better you can try a few of these
      - instead of checking if a point is occupied by an enemy, you can already generate a point Infront of the other enemy but behind the player. Then if every enemy does that, it ensures that they stand in a circle around the player.
      - or you can have each enemy reserve a certain angle around the player, and store that value somewhere, then each new enemy that comes takes up another piece of the circle, ensuring they never overlap

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

    Hey man i have this problem where when my Player respawns after death, when i killed an enemy, then when quiting the PIE it shows "Blueprint Runtime Error: "Attempted to access Player_C_0 via property K2Node_DynamicCast_AsBPI_Damagable, but Player_C_0 is not valid (pending kill or garbage)". Node: Return Attack Token Graph: EventGraph Function: Execute Ubergraph BP Enemy Robot Base Blueprint: BP_Enemy_Robot_Base"
    Robot base is my enemy base, and player is my base player, idk why it keeps pooping that whenever i respawn and then kill enemies, it doesnt happen if the player doesnt die

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

      Hey there, that's nothing to worry about, this probably means that you have a timer running somewhere trying to access the player after they have been removed from the level. If it doesn't happen often, then it won't cause any performance issues. If it does happen often, you can just add a branch and check if the player (or whichever actor is giving the error) "Is Valid" before accessing it, and only on "true" do you access it

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

    This time it's like a Dark souls enemies! AND I AM RIGHT NOW MAKING Dark Souls like a game! I am really so grateful for you.
    You cool guy

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

      Awesome!! Really happy that it came at the right time for you 😊

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

      @@AliElZoheiry really I can't wait to see next part's. You very awesome person
      I am really so gladly meeting you

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

      @@AliElZoheiry I am really so sorry for disturbing you. How much part's will be there?

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

      Hey Roy, no disturbance at all ;) But I haven't decided how many parts yet, I will just keep going until I run out of ideas, or if I find a different series that is more interesting

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

      @@AliElZoheiry You awesome person! Thank you so much! I am really so gladly meeting you.
      I am gladly helping supported you ❤️

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

    Now my melee enemy only strafes when I uncheck the inverse condition on the “is within ideal range node” also only attacks once and then stands near player. Lastly, they won’t run to the player when they start strafing and I run away, remember, the condition has to be inversed for them to strafe at all. It’s weird.

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

      1. Melee Enemy Only Strafes When Inverse Condition is Unchecked:
      - Make sure that the conditions and logic in your behavior trees and blueprints are correctly set up to trigger strafing behavior based on the distance between the enemy and the player.
      - Double-check the settings in the "is within ideal range node" and the associated conditions to ensure that it triggers strafing as intended. You may need to adjust the conditions or distances for proper behavior.
      2. Melee Enemy Only Attacks Once and Then Stands Near Player:
      - Check the attack logic in your behavior tree and blueprints to ensure that the attack behavior is properly triggered and looped.
      - Verify that there are no unintended pauses or stops in the attack sequence that could lead to the enemy standing near the player after a single attack.
      3. Melee Enemy Won't Run to Player When Strafing and Player Runs Away:
      - Review the movement settings and conditions in your AI controller and behavior tree to ensure that the enemy can smoothly transition from strafing to chasing the player.
      - Adjust the AI behavior to prioritize chasing the player when the player moves away, even during strafing behavior, by updating the movement logic and conditions.

  • @fxclimber
    @fxclimber 14 днів тому

    I have deployed four melee enemies, but only one of them considers the player as an enemy. The other three recognize the enemy that targets the player as their enemy. Where might I have gone wrong? I'm not sure where to start debugging.

    • @fxclimber
      @fxclimber 14 днів тому

      After trying various tests and almost giving up, I decided to revert to the old method of creating the attack using nodes. I checked it and then switched back to the refactored task to see the previous situation again. Surprisingly, now all the enemies take turns attacking as intended. It's quite amazing...

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

      In the part where you handleSensedSight, this is where we setup what happens when enemies see each other. If you followed the next tutorial (on setting up teams), then you should have a condition there in that function that checks if the actor sensed is on the same team or not, and if not, it will attack them. So double check that part and make sure you didn't miss anything

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

    Wow pls make ai random spawn system too.

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

      Hey! Thank you for the suggestion, I'll add it to the list 😉

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

    Can i use this ai series for a mmo rpg game?
    Please answer
    ]

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

      The behavior can be used in any type of game, so of course you can use it for an RPG game, but if you want to make an online/multiplayer game, then you will need to add "replication" to this AI behavior, because I've only shown how to do it for single player games

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

      ​@AliElZoheiry thanks I will watch the whole series cuz you are helping a lot for learning the engine

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

    So, if you can only ever damage one Target at a time, what is the point in having a dictionary at all? since when you call Attack end, Attack start you only deal with one Attack target at a time, when you call "Death" you will also have at the most one Attack target in the dictionary, but since you remove the tokens on interrupt too, I don't think you have any tokens to return there either.

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

      Hey there! Keep in mind that every attacker can have a single attack target, but the attack target can be attacked by multiple attackers, so it's a one to many relationship, and that's the reason for having the dictionary

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

      I'm implementing a simpler system, but I just wasn't able to understand the logic behind having a dictionary for it, maybe if you can damage multiple characters at the same time or attack.

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

      So, are you stupid or don't care to reply?@@AliElZoheiry

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

    I tried following the video exactly as was taught. My melee enemy are working fine but Ranged enemy just doesnot move at all. It keeps on shooting projectiles from one place standing idle. When I run away it doesnot follow me at all. Is anyone else facing similar issue.

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

      Hey, not really sure what your problem is, but make sure the ranged enemy is running the EQS correctly, and their movement speed is not set to zero, and that they are not already standing on the ideal location

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

    I am interested in being your petreon member, do you have un-released video there?

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

      Hey! I don't have unreleased videos there but I upload the entire project files on my Patreon free to download and use in your own games www.patreon.com/Alizoh

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

      @@AliElZoheiry you are an awesome human being :) 👍

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

    My enemies dont attack now :( they just circle around me strafing, and i have plugged in AI move to the Controlled Pawn you missed in the end also.

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

      This is in the BTT_MeleeAttack

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

      Sounds like you're token count might be zero, try debugging and seeing if there are tokens or where the behavior stops

    • @user-xv6hh8iw8m
      @user-xv6hh8iw8m 21 день тому

      I had the same problem. Did you fix it?

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

    sir how can i fix my melee enemy is trying to walk through walls

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

      so let me explain it i tryied to debug it but i found that in seek subtree its stuck in move to point of intrest and when i run away and take that turn on the slope it just walk foward then switich states so rapidly in trying to move to ideal range to attack i guess its just tweaking and doing wired stuff like walking through walls whenever i am getting move to or move to ideal range node and specially these two places like when attack range and while seeking

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

      Hey Akib, I'm not really sure why that would happen, to be honest I don't understand the problem quite well without seeing it

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

      @@AliElZoheiry it's okay the wall problem was fixed when I created one more new level seems like it was glitch but I tested the melee enemy it's just losing head like not changing the movement speed and all those stuff

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

    the enemies hit each other and the player also.what i do wrong?

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

      Hey there, Unfortunately I can't help with more info 😅 I suggest asking your question on the discord community, or look for a similar question asked, maybe someone already faced this problem. Good luck

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

    Hi there! Are you able to make a tutorial about the player being able to target the clostest enemy to it?

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

      Hello, That kind of functionality is going to be more related to a player combat system and not really related to enemy AI, so I will consider it once I finish this AI series though

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

      @@AliElZoheiry Alright that’s fair enough! Any suggestions on how to go about it as I could probably code it myself. But I’m not sure if I should check the distance of enemies to the player or who the player is looking at. I’m just not 100% on how to go about it. Thanks

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

      ​@@mrknowbody_if you already have a targeting system implemented, then the rest is quite easy. To get the distance between all enemies, use "get all actors of class" node to get all enemy actors. Then loop over them, and use the "get distance" node to get the distance between each enemy and player. Then the closest one is your target

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

      @@AliElZoheiry that makes a lot of sense I’ll implement soon! Thanks

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

      @@AliElZoheiry Sorry for all of the questions but... how would i go about making the enemy not attack the player if they're reacting. I've tried to setup a blackboard condition on the attack however i don't think it works. Thanks in advance!

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

    now one more new problem is that my melee enemy is strafing faster even when i used the setmovementspeed correctly like what the first problem was solved by changing the map but this one is just frustrating

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

      Is he actually moving faster, or just the animation playing fast?

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

      @@AliElZoheiry no aniamtions were good but the speed functions in melee enemy was deleted i dont know i didnt touched that after i made it properly its randomly got missing i put the ranged enemy and melee toghater to see the difference between them then i got to know about it its fixed just today i catch up with this toturial but that he trying to walk thru walls like jin is wired i had to create new map then it waas fixed i dont know why it happend si there any option that controls ai path on maps

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

    actually i reliased it is not stoping on higher platforms its just jumping down and thhen coming to attack i deleted the nav link

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

      and i just find out that every enemy behaving like that
      \

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

    can you add budyy AI tutorial?

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

      That's a great suggestion, I'm currently focused on enemy AI, but I'll definitely consider a friendly AI as well

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

    >not coordinated in any way
    they are too coordinated and all attack at the same time.

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

      That's one way to look at coordination 😅

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

    system is not working

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

      Sorry to hear that, I made a video on how to fix bugs, it's on my channel. Maybe it will help you find the issue you have

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

      @@AliElZoheiry thanks for your reply , the problem was in the new 5.3 update in the ai tree the actor location was not updating it so enemy just stuck in same postion sorry for that .greate video ,keep making these kind of video ,it really helps me 🫂

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

      @@user-zj7oq7zz2rhow did you fix it?