Smart Enemy AI | (Part 9: Stealth Seeking & Perception) | Tutorial in Unreal Engine 5 (UE5)

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

КОМЕНТАРІ • 170

  • @diliupg
    @diliupg Рік тому +20

    You have really taken this ai series to the next level. I have never seen anything so complex anywhere on the internet and man haven't I searched! Brilliant!

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +5

      Thanks so much Diliupg, I appreciate you saying that, and I hope to keep this standard up in all future videos as well :)

  • @electronicinfection
    @electronicinfection 4 місяці тому +6

    I can't thank you enough!
    Most valuable Unreal Engine tutorial content on UA-cam for sure.
    A thousand times THANKS!

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

      Thank you so much for your kind words! I'm really happy to know that you found the content valuable. Happy to help! 🙏

  • @luckydawgs
    @luckydawgs 27 днів тому

    Awesome walkthrough here! After part 3 I tried tackling the AI forgetting stimuli myself and tried using that On Target Perception Forgot event. Man does that event not do what I thought it would. Huge rabbit hole. Ended up refactoring to what you have here and it works perfectly. You're the man!

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

      Hey, I'm glad to hear you found the refactor helpful! The On Target Perception Forgot event can definitely be tricky. Thanks for sharing your experience! 🙏

  • @Clydiie
    @Clydiie Рік тому +3

    I love how deep we are getting with the series bro Ive got a lot of catching up to do since Ive been away for a while!

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +2

      Glad you're still finding it interesting. It's getting pretty deep indeed, sometimes I even have to learn new things before teaching them, which is great for me too :D

  • @theindiegamedude
    @theindiegamedude Рік тому +4

    Thanks for another great update to this series! Very well thought out and explained :)
    Keep up the great work, and stay blessed 🙏

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +2

      You're very welcome, and thank you for the support as always 🙏

  • @Shizuma450
    @Shizuma450 Рік тому +4

    Very instructive video, always so elegantly explained :P
    Thank you so much Ali for taking your time and sharing your knowledge with us, thanks to you I'm starting to search unreal much more independently, whereas at first I was rather shy because I was afraid of breaking something haha.
    In any case, your lessons give us a lot more confidence in our own abilities!
    Thank you so much!

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      You're most welcome 🤗 I'm really happy to see your growth and advancement, and I appreciate your support as always 🙏

  • @roydash5657
    @roydash5657 Рік тому +2

    Every your tutorials AI just better & Better! Thank you so much for everything. You really very helpful me

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +2

      You're very welcome Roy, and thank you as always for your kind words and support.

    • @roydash5657
      @roydash5657 Рік тому +1

      @@AliElZoheiry I am grateful for your help.
      Thank you so much for everything. I wish you God always helps you

  • @demonics7549
    @demonics7549 Рік тому +2

    Something that I would love to see in a future part is how to setup different audio for example the AI can hear running from further away however if you are walking you can get much closer without being detected

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +2

      I briefly touch on this in the perception tutorial ua-cam.com/video/gsyZdKYAT_4/v-deo.html at 9:17 where I talk about Loudness and MaxRange, so you can try that out, but know that it will require some trial and error to get it right

  • @voodoomonkey7824
    @voodoomonkey7824 Рік тому +1

    Very useful tutorials!
    Thank you!
    It would be interesting to teach the enemies to act as a team.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Indeed, that will be coming soon in one of the next parts

  • @ДинарВасильев
    @ДинарВасильев 6 місяців тому

    Спасибо тебе за твой труд и что делишься своими знаниями с нами. Ты как всегда на высоте!

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

      Спасибо большое за ваш комментарий! Я очень рад, что мои видео приносят пользу.

  • @proxima7199
    @proxima7199 Рік тому +1

    As an idea for one of the next videos - improve enemy AI in the way, that for example - > 1 player vs 5 enemies (3 melee, 2 ranged) -> 3 melee enemies try to attack from the front of the player position, 2 ranged enemies try to attack from the flangs (1 from the left , one from the right)

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +2

      Ahh, so have enemies decide on their position based on where other enemies are, their type, and distance, etc..
      That would be really interesting, it would complicate things a lot, but definitely possible. I'll consider it

    • @proxima7199
      @proxima7199 Рік тому

      @@AliElZoheiry mb it will be interested for you.
      I've found a video with some cool combat AI features. I really don't remember the games which I've played in where such smart enemies logic have been implemented)
      ua-cam.com/video/PLchlSvrSpc/v-deo.html

  • @themeskimoze
    @themeskimoze Рік тому +2

    as always great brilliant and easy to understand and follow tutorial. keep up the good work man

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Much appreciated! Really happy you found it interesting and thank you for your continued support 🙏

  • @azwadhossain6557
    @azwadhossain6557 Рік тому

    Caught up to Part 7, with your series. Was away for a while. But I would love to see (1) Enemy AI Dodge your attacks, (2) Player Parry Enemy Attacks (3) a Boss AI and (4) Groups of Enemies working together like a single entity. Like, if one enemy sees the target it can call the other enemies to this position.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Thanks for the suggestions, I've been planning on a couple of those things, mainly the group of enemies and the boss AI, so that will come soon hopefully 🤞

  • @Kkurox
    @Kkurox Рік тому +2

    Thanks for the effort, I am learning a lot from this series ♥

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      You're very welcome. Happy to see it's helpful

  • @POPCORNGameMovia
    @POPCORNGameMovia Рік тому

    Would lovely and interesting to see how you make an enemy attack structures that you hide on top or behind them. For example if you have a base and the enemy follows you or see you in the base they will melee attack the walls or structures. Hope this idea will pass :)
    Thanks for all the great info you provide us, much appreciated. Take care and all the best!

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Thank you for the suggestion 🙏 I'll add it to the list and I'll let you know if I do it of course

  • @InnerspaceX
    @InnerspaceX Рік тому

    Thanks for this another great part. Idea for part 10: If the AI chasing you, and there is a table or box in the way, maybe the AI jump on/over it?

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Cool idea! I'm considering a tutorial on NavLinks, which are responsible for similar behavior, thanks for the suggestion

  • @hernanferreira1537
    @hernanferreira1537 11 місяців тому

    Thanks Ali for such interesting videos! excellent learning material! Greetings from Argentina

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

      Thank you Hernan, glad you're finding this useful ☺️🙏

  • @kyuzo2974
    @kyuzo2974 Рік тому

    Awesome series! I would like to see how you handle a situation when there is no valid EQS point like the one we had in this video.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Thank you. For handling EQS failure, it would simply be another branch of the tree under a selector node

    • @kyuzo2974
      @kyuzo2974 Рік тому

      @@AliElZoheiry so do we check if the PointOfInterest is valid or not or is there another way to check if an EQS failed?

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      You don't need to check something manually. If you put the EQS query in a left branch of a "Selector" node, and it fails, then the selector will automatically try to run whatever is on the right branch, because if you recall how selectors work, they go from left to right and stop execution when a branch succeeds, so if something fails, it will keep moving to the right.
      Knowing that, you can put the EQS in a selector node, and to the right of that EQS query, you can put whatever you want to happen if it fails. I hope it makes sense.
      Feel free to join the Discord server btw, and I can show screenshots as well there (Link in the description)

  • @newtforgegames
    @newtforgegames Рік тому +1

    Such amazing content as usual! Thank you for this!

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      You're very welcome. Thank you for always watching ☺️

    • @newtforgegames
      @newtforgegames Рік тому

      @@AliElZoheiry I do have one question though, how would you make it so the AI doesnt instantly go into seeking and has kind of like a 2 second grace peroid on the chase? Because as soon as I turn a corner it instantly begins seeking

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      @@newtforgegames Yeah, I was indeed thinking of modifying that a bit. So when the enemy loses sight of the player, a timer starts (let's say a 3 second timer) then if the timer expires, the enemy goes to seeking, but if the enemy sees the player while the timer is running, then the timer get's cancelled and as if nothing happened. That's how you would implement that "grace period"

    • @newtforgegames
      @newtforgegames Рік тому

      @@AliElZoheiry That exactly! Thanks for your help as always 👍🏻

  • @梁雨熙
    @梁雨熙 Рік тому +1

    Thank you god of ue5 tutorial👍👍👍

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      You're very welcome! Thank you for your support 🙏

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

    Excellent As Always!

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

      Thank you! I'm glad you enjoyed it!

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

    About usage of the OnTargetPerceptionForgotten
    You need to enable the Forget Stale Actors in project settings (Engine - AI System)
    And it looks like working as it should - fire when the age of the sense stimulus expired

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

      Hey there! Thank you for your comment and sharing that tip with us. It's really helpful for anyone encountering the same issue. Keep up the good work!

  • @Зритель-ш6у
    @Зритель-ш6у 5 місяців тому +1

    Very useful tutorials! Thank you! Like.

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

      Glad to hear that you found the tutorials useful! Your support is much appreciated! Keep on creating!

  • @twitchtutkunu576
    @twitchtutkunu576 3 дні тому

    Another excellent video, thank you Ali. The only thing I want to ask is that we set the field of view of our characters to 60 degrees. How were we increasing it? The reason why it is wanted to be increased is that sometimes the characters are next to each other and do not see each other.

    • @AliElZoheiry
      @AliElZoheiry  4 години тому +1

      Hey! Thanks for the kind words! To increase the field of view, you can adjust the 'Field of View' property in your camera settings. Just make sure to set it to the desired angle. This should help your characters see each other better.

  • @amarshil2415
    @amarshil2415 Рік тому

    This is what I was waiting keep making more videos

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

    4:14 The actor accidentally gets unpinned from the 'Remove Item' node, I was having an issue with the AI constantly getting set to the 'Passive' state after losing the sight of the player, check here and reconnect if you're having a similar issue.

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

      Hey, thanks for the heads up! I appreciate you pointing that out for others who might encounter the same issue. Keep up the good work!

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

      @@AliElZoheiry Sure thing! Thanks for all the tutorials, your lessons have been incredibly valuable

  • @rugbyf0rlife
    @rugbyf0rlife Рік тому

    Amazing vedios. I only found them today and by the time I found your channel I was already exhausted from a day of developing. But in the 1 hour I binged, I fully fleshed out my DOT and projectile system. I also realized your modular design for stats was much better than my buggy mess, so tomorrow I'll be going through that video and implementing your system.
    I'm on my 4th day learning UE5 with zero coding or programming knowledge, but I'm a good way towards getting my first boss battle built. I have most systems down, but what I'm really missing is an in-depth damage state system (effects and modifiers), as well as the higher boss logic for phases and choosing rotations.
    Gonna be binging your videos over the weekend, and if I have a request it would be a video about lock on and hit mechanics (tab targeting and setting up "hitboxes" for large attacks.
    Not sure if you've already made a video on thism but I don't see one.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Thank you so much! Glad you liked them, and I'm always happy to hear that my videos are being binged 😅
      I'll definitely consider your request, I'll add it to the list 🙏

  • @Atl3m
    @Atl3m Рік тому +1

    Just what I needed ❤🎉

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

    I did not know, the EQS-Pawn will trigger the Sight-Sense. Since I tested during the video, I was baffled for half an hour, why my NPC can see me trhough walls haha.

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

      Haha, classic Unreal Engine surprises! Glad you figured it out 🤔 Have fun experimenting with the features!

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

    Great tutorial series Ali! I am loving every moment of it. I do have a question though. I am not sure when it happened by my AI no longer move along a set patrol path any longer.

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

      Hey, thank you for your kind words! I'm happy to hear that you're loving the tutorial series. I don't really know why your AI stopped moving, but make sure they still have a patrol path assigned to them when placed in the world

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

      @@AliElZoheiry They have a path set to them. Is there a way to test if the AI is picking up the patrol path?

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

      *Update* After doing your Jumping/Nav Link tutorial and when you implemented the "SeekAttackTargetTimer" clear and invalidate timer by handle updates this somehow fixed my AI Patrolling issues. They started to use the patrol routes set out for them...Strange one...but any way your tutorials are amazing and you are doing an excellent job sharing your knowledge with us. I commend you sir!

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

      @@andrewvanderwalt8494 Open your behavior tree while the game is running and check that it goes into the patrol branch

  • @abkarenoahmed4287
    @abkarenoahmed4287 Рік тому +1

    you are great Please keep going ❤❤❤❤❤❤

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Thank you very much, I'll do my best to keep it up

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

    Hi Ali! Amazing Tutorial Series so far, one of the best! I've been following this series without too much problems execpt in this video, I've re-watched it multiple times thinking I forgot something, but I seem to be stuck. 1. My Enemy_Base just freezes when he see's me and wont ever do anything else after wards. (dont know when that started happening)
    2. I can never get the ennemies to forget me, even with the Print, i can never have it to prrint, it's as if they cant forget me X).
    3. Mayeb it's because of issue #2, but my Enemy_Melee once he see's me always seems to know where I am no matter how far or how many obstacles I hide behind with.
    Thanks for any help given!

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

      Once Again, took a 3-4 hour break and found what was wrong! On the Set Timer by Event, I had forgotten to check "looping" as True... I want to cry for how long I pulled my hair out looking for the answer but I'm Happy I figured it out. Though for Issue number 3 and 1 I still haven't figured it out

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

      Hey, glad you figured it out. It's usually these small things that take a long time to find, but you learn a lot from the process. Keep up the good work!

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

    And wouldn't it be more optimized if we only did it in the on perception updated event instead of doing it every 0.5 seconds?

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

      Also answered in previous parts :D

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

    or why we use knownseenactors array instead of get currently perceived actors node

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

      Also, we use both. I feel like you may have skipped a few older tutorials.

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

      @@AliElZoheiry I want to watch them all when I have time, but unfortunately I don't have that much time, but ı will look previous part

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

    why we are doing that with get known perceived actors , why we dont do with get currently perceived actors

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

      Both are used. Get known perceived actors get's actors will get more actors that currently perceived actors, because it also keeps a history of previously perceived actors

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

    when I try the sight sense it works fine, When he sees me, he tries to find me,then 5 times loop, then goes passive, and the same if he sees me again. but when I damage him or make a sound after a seek cycle, things weird happen,if I damage him he doesn't atttack, if I make a noise at the other side of a block, he doesn't go

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

      Sounds like he might be stuck in some state and not switching, debug the tree while this is happening to see which state the enemy is in

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

      @@AliElZoheiry I just realize that enemy forget actor and set passive state till he see actor again. but enemy unable to investigate sound as every 0.5 sec he turning passive state. Could you please help to fix that?

  • @Atl3m
    @Atl3m Рік тому

    Maybe seeking should not go directly to the target but but random location in radius of target. Just a idea.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Right now it takes the location at the moment of losing sight, so the last place where they saw them, you can of course change it to be a random point in a radius around that location

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

    hi just wondering what video did you do the first sub_trees for the different state types I feel like I'm making a huge over sight in not finding them - also please keep up the great work on your videos they have been helping me greatly as a newbie in all of this!

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

      I believe that was in Part 5, where I started to create different enemy types ua-cam.com/video/UDsbwnuD22Q/v-deo.html

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

      @@AliElZoheiry thank you so much this is a big help !

  • @proxima7199
    @proxima7199 Рік тому

    Thank you for the video! I haven't watched new videos yet, so decided to ask there :)
    Have you added some changes in blocking mechanic in newer videos? Because now if a player attacks - > enemy starts blocking and wait to OnBlockEnd event to finish the blocking. So if a player makes a hit/shot and by some reason it doesn't hit the enemy -> he will be in the blocking state until the player hit the enemy one more time.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Hey! I indeed made a very nice improvement to the block functionality in the first chapter of this video ua-cam.com/video/UIAazOgww_I/v-deo.html
      I made it a lot simpler, and fixed some issues with multiple enemies blocking, hope that's what you're looking for

    • @proxima7199
      @proxima7199 Рік тому

      ​@@AliElZoheiryCool, thanks! I'll check it out

  • @Maxred-92
    @Maxred-92 3 місяці тому

    Hi Ali, thanks for this tutorial! I am new to unreal and I'm trying to learn as much as possibile and you are a guide. I have a problem: when I set the status walking or jogging in the behaviour tree, the enemy continue to run (even if I set idle); the same if I change the value in the blueprint (idle, walk, jogging and sprint), doesn't seem that anything change. I debug the BT as you suggested in a video but I don't understand the problem. Have you any suggestion?

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

      Hey there! Thank you for your comment. You need to make sure that changing the enemy actually has different speeds setup for jogging, walking, idle, etc.. using the interface function implementation.

    • @Maxred-92
      @Maxred-92 3 місяці тому

      @@AliElZoheiry Thanks Ali, I set up different speeds as you showed in your video (walking 150 - Jogging 300, Sprint 500), but when I changed the value in the BP_EnemyMelee nothing change in game. I'll try to put some print on Discord to show you my situation. Thanks for the answer

  • @XJetprime
    @XJetprime Рік тому

    Hi, very good serie. I Watched next videos, but with this system i don't understand how to prevent a enemy to switch his attack target when he's already attacking an enemy, because it's always updated from his sight

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Hey, thank you 🙏 if you followed the series from the beginning, you will see that in the HandleSensedSight function of the AI controller, I first check what the current state is before changing it to attacking, and if it's already attacking (which means the enemy has a target already) then I don't do anything

  • @gamersantai7796
    @gamersantai7796 Рік тому

    thank you for the tutorial, the melee AI worked perfectly. but i did a test run for the ranged AI and the find cover sequence and movetolineofsight does not work anymore, if the ranged AI is low in health it escaped but not regenerating health or if the player is out of sight it simply entered passive state

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Indeed, that's a bug I have yet to fix. I have a list of bugs and improvements that I'm planning on tackling in a separate video in the future and that is one of them.
      If you want to know how I plan on fixing it, I have 2 possible approaches:
      1- first, is to make the healing its own state, that way you can't be both investigating and healing
      2- Second approach, is to keep remembering the player when the enemy goes to heal, that way they never trigger the investigation state

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

    Is there any tutorial on how to add more depth to this kind of AI stealth system by checking if the player is in the shadow or not?

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

      Hey, thanks for your comment! I don't currently have a tutorial on that specific topic, but that's a great idea for a future video. I'll definitely consider it for the upcoming content. Thanks for the suggestion!

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

      I'm having an issue where after setting up the seeking behavior the melee just gets stuck in move to (go to last known location) when I check in the debug it says point of interest invalid. The enemy attacks if I trigger the attack key that was for testing but if I walk up to it it just equip weapon then goes to idle ​@@AliElZoheiry

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

      I'm having an issue where after setting up the seeking behavior the melee just gets stuck in move to (go to last known location) when I check in the debug it says point of interest invalid. The enemy attacks if I trigger the attack key that was for testing but if I walk up to it it just equip weapon then goes to idle ​@@AliElZoheiry

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

    Please add to this stealth execution kill

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

      Hey there! Thanks for your suggestion. Stealth execution kill is a great idea, I’ll look into adding that in a future video. Appreciate your input!

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

    So I'm having a problem where when the enemy also detects another enemy, it breaks the ai and they no longer chase me if they look at me again, and im not entirely sure how to fix it.

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

      You can prevent enemies from reacting when detecting each other in the handleSenseSight in the AI controller. By checking if the sensed pawn is the player or another enemy, and if it's another enemy, just don't do anything, and if it's the player, then proceed to attack

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

      @@AliElZoheiryI got it fixed now thank you, I am now running into another bug where I think the enemy senses both sound and sight, it messed it up and all continues sound will be heard and immediately ignored. Also to note is we have footsteps making sounds.

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

      I think it might be something with the handle lost actor because it keeps skipping over the seeking as well

  • @essa4436
    @essa4436 Рік тому +1

    Ali How do you get an AI to enter the door??

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +2

      So you're interested in an AI interaction system (where the AI interacts with objects in the world)?

    • @essa4436
      @essa4436 Рік тому

      @@AliElZoheiry Yes (and I Sorry for asking more than once 😅)

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      @@essa4436 No worries, I'll definitely consider this in the following parts

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

    hey at 14:38 y noticed that after you check the attack target is equal the actor to forget the actor is not plugged in remove item anymore. should it be like that? i mean it does nothing if is not connected

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

      Hey! You are correct, when I pulled off of attack target to do the check, this got disconnected automatically from the remove node. I didn't want that to happen and i believe i fixed it later on (or maybe off camera) but very good catch, you should keep it connected

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

      @AliElZoheiry thank you. I was confussed

  • @lolaswift111
    @lolaswift111 Рік тому

    Hi Ali, will you talk about behavior tree in multiplayer in your future tutorials? Currently I'm trying to Replicate shooting logic in the Behavior Tree Tasks but it just doesn't work. Moving the logic to the AI controller or AI BP is the only way? thx.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Hey Lola, I'm currently focusing on single player only, as multiplayer wouldn't be so much AI related, but mainly replication of the enemy actor and the AI controller, so it's possible that I will touch on it in the future, but unfortunately not now

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      But to add to that, it is definitely possible to replicate all this behaviour in multiplayer

    • @lolaswift111
      @lolaswift111 Рік тому

      @@AliElZoheiry Many thanks for your replies Ali. The current series are great. Please continue as planne. Love all the videos. Making videos takes lots of effort. Really appreciate your work. And for the multiplayer stuff, I've figured it out with the help of some experienced developer. Indeed needed to do the replication of the enemy actor and leave the behavior tree out of it.

  • @Secretlycat31
    @Secretlycat31 Рік тому

    Hello, will you be making a tutorial series on ranged ai as well as close ranged? I'm trying to make a simple system with behaviour trees and haven't found many tutorials for it in ue5.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Hey, what are you looking to learn exactly? Let me know and I'll definitely consider it

    • @Secretlycat31
      @Secretlycat31 Рік тому

      @@AliElZoheiry I really want to learn how to make an ai that has the ability to just walk around randomly (easy enough and managed to find tutorials in that part), but then after a set trigger happens they pull out guns and start attacking the player which the player will in turn become invincible and also have a gun. Whether they can hide behind cover would be nice but not necessary. Trying to make some for a university project with some friends. And having this switch in narrative of puzzles to then fps shooter. So the ai needs to somehow just be randomly walking around in the level and then an after and event they can then start attacking the player with guns and then also be killed by the player. :)

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      @@Secretlycat31 that's pretty much what we have in this series, have you checked the earlier videos as well? Because I do have a patrolling state (which is randomly walking around as you described it) and I have a ranged enemy that can shoot the player and can die

    • @Secretlycat31
      @Secretlycat31 Рік тому

      @@AliElZoheiry oh ok, I got a bit stuck on the first video with creating the initial blue prints as for some reason the attack animation wasn’t triggering. So I didn’t look through the rest too closely. I’ll try give it another go though.

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

    Hey I followed this series from video 1 to 3 and then jump to this video part 9. However is there anywhere in the code u make it so the AI only detect the player. For some reason my AI is detecting other AI

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

      Hey there! I'm glad to hear you've been following the series! I recommend following it in order though, I don't really remember when certain things were added

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

      @@AliElZoheiry hey I figured it out by adding a tag to the player. And then check if that actor has tag in the “perception updated” event

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

    No idea why, when the moveto under go to last known location is called in the Behavior Tree, it gets stuck, debug says Point of Interest returns invalid. not always but randomly

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

      ah.. I get it now, Didn't see the general notes. It is in fact because of the environment

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

      Glad you figured it out. Well done 💪

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

      ​@@1tapeoka1what does this mean

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

      Im having this exact issue what was your solution ​@@1tapeoka1

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

      ​@@AliElZoheirycan you help me with this issue please

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

    How do you have another enemy that see a teammate attacking set them selves to attacking and attack the target they are fighting?

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

      In the HandleSenseSight, you can check if the current actor is seeing another team mate by comparing their team number. Usually after that we do nothing, because they are on the same team.
      Instead, what you can do, is an additional check, if the teammate I just saw, is in an "Attacking" state (based on their currentState variable in their AI controller), if yes? then you can get their attackTarget (also a variable in the AI controller) and set the current actor's state to attacking that attackTarget

  • @snyx_yt9595
    @snyx_yt9595 Рік тому

    Please answer my question from india 🇮🇳 i am a middle class guy so bought i3 11 gen laptop with 8gb ram and 512 gb storage with integrated graphics can it possible for game creation if not what type game it can run hope u answer this
    Love ❤from india

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      With an integrated GPU, it would be very difficult to run Unreal Engine, it will probably open, but it will be very slow and will crash often, so unfortunately I don't think you can use that laptop for game development

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

    Dear Ali Elzoheiry,
    Could you please help me. I don't know why it doesn't work. Here are the values that PrintString gives:
    I've made this functionality 5 min - 11 min 30 s.

    KnownSeenActors + Length:
    when AI doesn't see me = 0;
    when AI sees me = 1;
    when AI sees me again = 1;
    AIPerception + Get Known Perceived Actors (AISense Sight) + Length:
    when AI doesn't see me = 0;
    when AI sees me = 1;
    when AI sees me again = 1;
    when AI sees me = 1 then I die = 0!!!!;
    It means that the values are the same in both cases and "branch !=" gives false
    And value values differs only when I die.))))
    UE4 v.4.26.2
    Thx in advance! =)

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

      Hey, I'm not really sure I understand what's going on here, it's really hard to debug just based on that description. Though I do see you're using UE4, and even though most things should work the same, some things might work a bit differently, I can't tell you exactly what since I never implemented any of this in UE4.
      I suggest joining the Discord server and asking your question there with some screenshots, then someone can help you better with some visual clarity

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

      @@AliElZoheiry Hello the discord link is expired.

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

      @@AliElZoheiry I've found the mistake of mine)))))
      I didn't add the 5 sec "Max age" in AISense_Sight! =)
      I'm SO happy!!!
      Merry Christmas and a lot of presents!!! =))))

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

      Awesome! glad you fixed it. Strange that the link expired, I have it set to never expire, can you try this one discord.com/invite/AEnM4wvYzN@@itsroachtime5243

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

      ​@@AliElZoheiry Hey! Eventually discord link works. It appeared I have to start discord first and only then follow the link. Well, live and learn.)))

  • @jiwik731
    @jiwik731 Рік тому

    This is amazing. Is it avaliable on the marketplace to buy?

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      You can download it all for free (with a 7 day trial) on my Patreon (www.patreon.com/Alizoh) but I would of course greatly appreciate it if you stick around after the trial and pay the $5 😇

    • @jiwik731
      @jiwik731 Рік тому

      @@AliElZoheiry Yea. I am not willing to be a freeloader for such a great content. Let alone if i can learn something on the way. :D Btrees was scaring me but it looks pretty accesible as everything in UE after all. And what is you licence? Is this code free to use in commercial projects? Credited of course or some kind of licence? It will probably never gonna happen but what if... :D

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      @@jiwik731 I appreciate the support 🙏 thank you. And I'm very happy to hear that my content is helping you.
      You're free to use any of my code and assets royalty free without attribution, although it's always appreciated to get credited for it, but you are under no obligation to do so

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

    The likes were at "420", so I didn't want to click especially because Amsterdam. But I had to ¯\_(ツ)_/¯

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

      Hahaha, I understand the struggle! Glad you couldn't resist clicking the like button in the end 😄

  • @occy999
    @occy999 Рік тому

    I am building my game differently but does anybody elses enemy stop working if i jump and they lose sight of me mid air they just stop. i think it cant reach the spot so it is always moving to it

    • @occy999
      @occy999 Рік тому

      Made a custom move to Task that accepts fails

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Indeed that's an excellent way of solving this

  • @Pastor_Bluntaround
    @Pastor_Bluntaround Рік тому

    Hello... i'm having an issue whereby the length of the Known seen Actors array and the Known Perceived Actors array is always equal even when i get out of range... 7:55
    I tried making the event specific to the attack target but it's still not losing sight of me.
    Any insight on what could be going on would be helpful.

    • @Pastor_Bluntaround
      @Pastor_Bluntaround Рік тому

      😅once more.i'm back again answering my own problems
      To anyone else having the above issue you probably ignored the part in this series where Ali put a Max Age of 5 Seconds for the Sight perception....so if you never touched the max age it's probably at 0.0 by default.
      Which therefore means the AI will never forget you no matter where you go

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Haha I was just about to reply telling you to check your MaxAge 😉 good job figuring it out 👍

  • @Restart-Gaming
    @Restart-Gaming Рік тому

    Hey would this whole ai setup with with animals

    • @AliElZoheiry
      @AliElZoheiry  Рік тому

      Yup, the concepts are pretty general and can be applied to any pawn of any type.

  • @mr_newfolder2844
    @mr_newfolder2844 Рік тому

    Hi add ai vs ai?
    Team working?

    • @theindiegamedude
      @theindiegamedude Рік тому

      I believe in Part 7 of this series, there is some info about having the AI fight other AI.
      If I'm remembering correctly, that is the section of the series where the ranged and the melee enemies duke it out :)
      AI working as a team would be cool to see. Perhaps having them call out to other AI enemies to help search for a target or something of that sort.

    • @AliElZoheiry
      @AliElZoheiry  Рік тому +1

      Indeed! Thank you for helping me answer questions, I appreciate it 🙏

    • @theindiegamedude
      @theindiegamedude Рік тому

      @@AliElZoheiry - Sure thing!
      We are a community like any other. I like to help where/when I can.
      Have a great weekend :)