Smart Enemy AI | (Part 14: Mage Enemy Continued) | Tutorial in Unreal Engine 5 (UE5)
Вставка
- Опубліковано 18 чер 2024
- Learning Goals:
1 - How to create an enemy from scratch with a custom mesh and anim BP
2 - How to create a magic attack ability
3 - How to create a teleport skill with cool VFX
4 - How to create a heal AOE ability
5 - How to conceptualize the behavior of a new enemy (Using Behavior Trees)
6 - How to setup a teleport EQS that teleports behind the player
To download the full project files from all my videos and use any assets I create in your own games for free, then join my Patreon. Also I would be forever thankful to my early adopters
/ alizoh
Join my Discord server to chat and mingle with the community
/ discord
Link to the full "Smart Enemy AI" Series:
• Smart Enemy AI Tutoria...
Link to the "AOE" tutorial:
• How to do AOE damage a...
Link to the "Damage System" tutorial:
• How to Build a Combat ...
Checkout my other tutorials on my channel:
/ @alielzoheiry
Chapters:
00:00 Outcome of This Part
00:39 Explaining The Desired Mage Behavior
02:19 Translating The Desired Behavior to the BT
05:27 Creating The Teleport EQS
14:08 Fixing Attack Behavior
20:40 Creating The Heal Functionality
43:46 Fixing Bugs
45:28 Outro
Assets used:
Paragon Gideon VFX: www.unrealengine.com/marketpl...
FX Variety Pack: www.unrealengine.com/marketpl...
Mixamo Character: www.mixamo.com/#/?page=1&quer...
Mixamo Animations:
Standing Idle
Standing Walk Forward
Standing Walk Back
Standing Walk Left
Standing Walk Right
Standing Run Forward
Standing Run Back
Standing Run Left
Standing Run Right
Fireball
Female Ninja running jump
Standing 2H Magic Area Attack 02 (For the heal montage)
Hit Reaction From The Right With Axe
About me:
I've been learning game development for a few years now, I do have a background in software engineering, and I also have a background in education, so being able to combine my love of gaming and love of education is the best way to spend my time.
I am currently working on this 3rd person action adventure game as a hobby, but I am also trying to build a community, thus I am creating UA-cam tutorials to find others who are interested in game development and design.
If you are interested in learning more or if you are interested in working together, please let me know in the comments.
#unrealengine #unrealengine5 #ue5 #gamedev #smart #enemy #combat #AI #blueprint #tutorial #behavior #tree #behaviortree #eqs #mage #teleport #magic #combat #enemies #spell - Ігри
This series just gets better and better. You're an excellent teacher.
Thank you so much for your kind words! I really appreciate your support and I'm glad you're finding the series helpful. Keep watching for more great content!
Thanks Ali for this Part two. Keep up the fantastic work. cheers.
Thank you as always Paul 🙏 I appreciate your support
It really feels satisfying watching your progress in unreal. Amazing, keep increasing your skill and confidence. Also i love the way you teach in whatever form you make it, it can never go wrong with your personality and teaching logic
I kinda wish i can work with you in a project XD.
Thank you so much for this kind comment, it really motivates me to hear that, I appreciate you and your support 🙏 😊
Thanks Ali! It's really fun to build these tutorials you are creating.
You're very welcome! Glad you're enjoying them ☺️🙏
Thx Ali. Awesome Part Again !
Thank you ezelrza ☺️🙏 glad you liked it
continue, your videos are awesome !
Thank you Tom, I definitely will continue 🙏
Tried watching other AI tutorials in between these and I just couldn't. They weren't nearly as informative or gripping as these. Really looking forward to the rest to come.
I really appreciate you Dustan, and I'm very happy that you find my content useful. I spend a lot of time on each video to make sure it's educational and fun, so I'm happy that you see the value 😊🙏
@@AliElZoheiry well I can tell you I have learnt more these past two weeks of your videos than the past 3 years I've mingled with UE. Looking forward to what's next
You really fantastic person! Really I am so appreciative your amazing tutorials!
Thank you so much
I wish you all the best! You are fantastic person
Thank you Roy 🙏 I appreciate you
@@AliElZoheiry No problem. I am really so gladly
As usual, excellent teaching quality!
I find that you have a methodical and "organized" side when you make your blueprint code, which is really handy for following the tutorial!
Thank you very much for this video Ali Elzoheiry! on the other hand...
The sound of your spell traumatizes me a little, it reminds me of your mini game XD, I tried to get closer to your score but without success haha!
Wow, again thank you Shizuma, I always love reading your comments, really glad you liked it.
P.S if you the sound is too traumatizing for you, send me a new one and I'll change it hahaha ;)
yes, bossss fight, I subscribed because of that!!
Coming soon 😉
Loving your videos! Just a quick tip. I added a "debug" variable to the EQS Testing Pawn. That way I just need to tick the box to switch logic instead of messing with the code every time. Hope this helps.
Thanks for sharing that tip! That sounds like a useful way to streamline the testing process. I appreciate your support and feedback!
One more tip. I put the EQS pawn on Team 0 and added logic to ensure team 0 is always on the same team. Also had to change a bit of logic on set mode to attacking to ignore team 0... now I can leave the EQS pawn anywhere and just toggle the debug flag.@@AliElZoheiry
Hi, really love all the work you did with this series and also on the other videos on the channel, can@t wait to finnish the series and also implement some other things from your videos.
I have a question what if I want (the mage enemy) to start first attacking me then move to an other ideal position and attack again, or keep staying in that place if the range to the target is "safe" enough do don't run or strafe (for exemple Player is fighting a Melee and Range enemy dont need to strafe because is safe in his position).
Hey there! Thank you for your kind words and support. To achieve the behavior you're describing for the mage enemy, you can combine the attack and movement logic within the behavior tree. You can decide based on the distance to the target whether the mage should prioritize attacking or repositioning. Additionally, you could include a condition in the AI logic to determine whether strafing is necessary based on the threat level. I'm glad you're finding the series helpful and best of luck implementing these features!
Thank you for the tutorial, i want to ask is it possible to combine the findcover eqs from ranged enemy to the mage one, so it escapes first, heal, then back to focus on player. i tried to just plug and play and it doesn't work xD
Yeah it's definitely possible. but there's a bug now with the findCover, after implementing the "Seeking" state. because when the enemy goes to find cover, they lose sight of their target, and that triggers them to go into the "seeking" state, until they see their target again, then they go heal, and they get stuck in a loop :D I'm planning on fixing that soon, but until then, if you want to use the cover with the mage enemy, you'll have to fix that bug as well
Hey Ali, quick question about the proper way to think about the bind/unbind to events. @ 20:07 I noticed you don't UNBIND event from On Attack End before Finish Execute like you did for Unbind Event from On Teleport End. Was this because it's just a tutorial or would doing so cause attacks to end too quickly without a delay elsewhere?
Hey Justan, good that you mention that, it's a very good question.
For best practices, it's always recommended to unbind from an events that are registered multiple times (like this one is registered on every attack) so for best practices, I should indeed be unbinding.
That said, since there can't be a case where one attack begins while another attack task is being executed I ignored the unbind because all it will do is trigger a "finish execute" on a task that isn't running, so it won't really do anything, but again, for code cleanliness I should unbind from these as well
Thank you for the explanation, I still have much to learn in general but this series has sped things up in more ways than just AI behavior. I drop likes during every intro because I know every vid is a banger. @@AliElZoheiry
Absolutely incredible, I just want to ask one thing about the healing part of mage. You have put Heal Task in the Attack State, so Mage never heals unless it goes in Attacking state, Shouldn't it be of more priority then Attack functionality?
Haven't gotten to next part of series yet, maybe fixed there, let me know if it is. Thanks again for awesome tutorial.
Hey there! Thank you for your support and feedback. You raise a good point about the healing functionality, it can indeed be its own state, but then you'll have to handle automatically going back to the attack state after healing and keeping track of the attack target even when in the healing state.
So it's some more work, but might be cleaner if it suits your game.
Forgive me if you already covered this, but can the enemies (ESPECIALLY the melee ones) chase while attacking and perform random attacks? I don't remember you ever covering animation layer blends.
Wow it's very funny that you would mention that now. I'm currently editing the video of my next tutorial which includes how to do animation blending 😅 so tomorrow you'll get to see that in part 15 😉
@@AliElZoheiry Oh, that's just phenomenal then...
I might have missed this, but where is the 'BTD_IsBelowHealthThreshold' designed? Watched older A.I videos and the AoE video yet cannot find it :(
Hey, this was added in part 6, to allow the ranged enemy to find cover, heal and then come out after healing. You can find it here ua-cam.com/video/18Awm1RYNMk/v-deo.htmlsi=OpyjUEg45ouD571F&t=2053 (link starts at timestamp 34:12)
@AliElZoheiry Thank you so much! Loving your video series so far, it needs way more views.
Though the mage enemy derives from ranged enemy after completion of this section, my mage spends a lot of time in the frozen state. Everything else works fine. what could be the problem?
Hey Diliup, I replied to you on Discord
does behavior tree able to limit the usage of certain task? let say the mage is only allowed to use the heal function for 2 times
Hey Brad, behavior trees are generally driven by the values of the blackboard, so if you have a blackboard value that tells you whether or not you can use a certain ability or not then you can definitely have the behavior tree do that
@@AliElZoheiry ah i see, thankyou for the answer
Yo take a look at the Asset: Combat Fury
Maybe u can take it apart its a very good combat system that costs 200$
But i want to learn how to do stuff like this
Hey, Yeah I saw Gorka Games just made a video on it, it looks pretty cool, I’ll test it out later and maybe take some elements from it
Please forgive me.
Ali when you making damage system for player? I am mean I can damaged multiple enemies?
Hey Roy, the damage system already supports player and enemy and can damage multiple enemies
@@AliElZoheiry I am really so sorry what's is part?
@@AliElZoheiry maybe I miss this part
Hello master, I'm following all your tutorials with great appreciation, I'm trying to create an Enemy using your AI system, could you create an enemy that Parrys and counterattacks?
Hello Keven, thank you for the support, I appreciate you 🙏
The damage system I have in place supports parrying, so it won't be that different from the block functionality we have in place, but I will probably be introducing the parry functionality in one of my later videos
@@AliElZoheiry Thank you very much for your feedback, I will be eagerly awaiting more tutorials
I've been wondering if you still thinking about ai can open doors and clamp the ladder
Hey, I'm definitely considering all non-combat AI behavior, but I have to finish the combat tutorials first
Right now I am needs boss fight melee enemy!
Coming soon hopefully 🤞
@@AliElZoheiry Amazing! I love you my dear friend.
I am so gladly Dante recommended your tutorials.
I am buying AI from marketplace but, this AI not good workings but, your AI amazing
Hi. Anyone knows how can I make the mage enemy to not damage melee and ranged enemies? (Mage can still damage those even if they are on the same team). Thank you
Hey ZRM, I answered on Discord, I hope it helps 🙏
Yep, got it. Thank you @@AliElZoheiry
I was having an issue where my mage wasn't teleporting as fast as Ali's. I'm in 5.3. I might have missed it if he did this in his, but I had to go to the character movement component and turn the "Braking Deceleration Flying" up to a higher number. 50000 works nicely. I also noticed if I put it too high (99999) it would occasionally get stuck at the end of it's teleport invisible for a few seconds. Just putting this here in case someone had the same issue!
Nice! Thanks for the addition, it might help someone indeed 🙏
Thanks! I tried to fix that too and I gave up. 👌
☺️🙏🙏🎉