Тёмный

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

Ali Elzoheiry
Подписаться 29 тыс.
Просмотров 13 тыс.
50% 1

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
01:12 Animations & Model From Mixamo
03:08 Creating the Mage Enemy BP
04:40 Creating the Mage Animation BP
10:05 Setting Mage Specific Variables/Functions/Montage
13:53 Creating the Mage Attack Functionality
22:00 Creating the Teleport Ability
39:39 Fixing Issues With the Teleport Ability
47:52 Next Up In Part 14
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 RU-vid 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

Игры

Опубликовано:

 

22 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 110   
@LegendOfCalvas
@LegendOfCalvas 9 месяцев назад
I've said it a few times, and I will say it again: this guy is the best UE teacher on RU-vid, hands down!
@kellowattentertainment
@kellowattentertainment 9 месяцев назад
Agreed.
@greatoni8452
@greatoni8452 9 месяцев назад
You right! Ali is the best
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you so much for the support and thank you both as well. I'm just happy that this content keeps providing value for you 🙏❤️
@greatoni8452
@greatoni8452 9 месяцев назад
@@AliElZoheiry my dear friend it's true. Everything loves you. Thank you Dante. I know about your channel. Your AI is better and amazing and first time I can see projectile tutorial. It's just awesome
@motivation_nation_today
@motivation_nation_today 5 месяцев назад
K hes good but what about gorka games ???
@PaulHousego
@PaulHousego 9 месяцев назад
Another excellent UE5 tutorial by Ali.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you Paul 🙏 I will be uploading the new projects files to Patreon shortly
@Douye_Adedeji2696
@Douye_Adedeji2696 9 месяцев назад
Watching your tutorials is giving me joy. Thank you Mr Ali. Also I sent you a message via discord.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thanks again Deji! I'm very glad that you are enjoying it 🙏
@Yggdrasil777
@Yggdrasil777 9 месяцев назад
Not going to lie, @39:20 that is some of the coolest teleporting effects I've ever seen. I may have to try this and keep it in. Loving the circling effect.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hahahah yeah it was really cool! Too bad it was a bug 😅
@XvirusX
@XvirusX 9 месяцев назад
thank you for the tutorials i gave up on my dream on making games and i want to start again in the future you are the best that i found on youtube :D
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you so much! Glad that you like the content, and I wish you the best of luck on your game. If you enjoy the process, then dont quit and just keep having fun with it
@kellowattentertainment
@kellowattentertainment 9 месяцев назад
Finally... I've waited so long for another episode. This guy is amazing
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you, I appreciate the support 🙏
@mebessusn
@mebessusn 3 месяца назад
I love the idea of using actual character movement instead of teleport to move the Mage enemy. Very cool hack to turn her into a ball and leave a trail too. Thanks so much for this series!
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Thank you! Indeed this method helps overcome some issues because it still uses navigation to teleport, so if there are walls or obstacles, then the teleport will go around them ;)
@Noob-nc5jq
@Noob-nc5jq 9 месяцев назад
You tutorial series of AI is so good ❤❤
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you for the support, I really appreciate it 😊🙏
@vyshnavk1117
@vyshnavk1117 8 месяцев назад
Love from India, You are so Amazing!! Thank you for your tutorials
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
Thank you for watching and for saying that. Glad you liked it 😊🙏
@UNDERKING_UDK
@UNDERKING_UDK 9 месяцев назад
Wow~! This is a great, complete tutorial!
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Indeed, everything you need to create an enemy from scratch. Glad you enjoyed it
@jacoposcala7170
@jacoposcala7170 2 месяца назад
For everyone, idk if thats a 5.3 thing, but i also had to set the fly braking deceleration to 99999, otherwise the teleport brakes and goes really slow :)
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Hey, thanks for sharing that tip! It's always helpful to have these little tweaks to ensure everything works smoothly 😊
@user-kk5xj3ey6m
@user-kk5xj3ey6m 9 месяцев назад
Finely Part 13 😂❤ I've been wondering why you can't do two videos on the one week?
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
For part 14 I've already finished it, just uploaded it now, you can get early access here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QkI8EKyUs9Q.html I will be putting live for everyone shortly. Generally though I can't make 2 videos every week because it takes a very long time to plan, record and edit each video
@saberfs7507
@saberfs7507 4 месяца назад
A great tutorial, could you tell me what to do if the projectile does not change its original direction, although all the conditions from the previous video tutorials are fulfilled correctly, and when choosing a specific target through the BP of the projectile, the trajectory changes
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Hey there, it sounds like the velocity isn't updating, so either you didn't add a "Target" to follow, or you're not updating the velocity correctly. Can't think of anything else
@user-bj8bs3rg5q
@user-bj8bs3rg5q 4 месяца назад
Прекрасно как всегда👍
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Спасибо большое за ваш отзыв! Рад, что вам понравилось! 🙏
@derakon4791
@derakon4791 9 месяцев назад
Wow it's so cool
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you! Glad you liked it 🙏
@LuinLuth
@LuinLuth 9 месяцев назад
ahaha Like a Boss Enemy ! I like it.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Good eye, exactly like that 👍
@stuartfrohna7470
@stuartfrohna7470 4 месяца назад
This is by far the most helpful UE tutorial I've seen. I finished the series but have one issue that has persisted, in my file, the teleport speed is much slower than in the project files, the code is exactly the same and after still having the issue copied the code over from the project files directly but still the boss and the mage move mores slowly in my project vs the project files. Does anyone have a solution for this?
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Hey there, glad you're enjoying this series and finding it useful! The only thing I can think of for why your teleport speed is slower, is the character movement settings on your enemy BP, there are a few factors that can slow down your character, that's ground friction, max acceleration and max speed. Check these values and make sure they are not too high or too low.
@specops2925
@specops2925 9 месяцев назад
Niiiiceee amazing😍👍... Your skills are completely awesome thanks Ali sensei..... I have problems actually im using UE4 every thing good but when I reach Damage System Tutorial i got some issues in Enemy Base Widget
@specops2925
@specops2925 9 месяцев назад
When I add create a variable Of Damage System and use it On begin play in Enemy Base the widget not giving me Self on Variable Damage System
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hey SpecOps, thank you 🙏 really glad you liked it. Regarding your problem, I'm not really sure I understand the issue, so if you would like to post your question on Discord with some screenshots, that would be very helpful
@aryantzh2028
@aryantzh2028 6 месяцев назад
can i implementing this blueprints on ue4 too?
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thanks for your comment! While the specific features may vary slightly between UE5 and UE4, the overall blueprint concepts and logic should generally be transferable. Feel free to adapt the knowledge from this tutorial to your UE4 projects. Good luck!
@star0gamer0player
@star0gamer0player 9 месяцев назад
I did all the things you did, for some reason my enemy stays in place when teleporting(okay i fixed it, there was no EQS before the teleport task XD )
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Ahh that would do it 😅
@lonewolfenock3527
@lonewolfenock3527 9 месяцев назад
Best AI tutorial I've ever seen. 👍 (Others are 'make AI follow you. The end'). I noticed something 'annoying'. When the AI strafs, they pass the player (1:07) to go to the target location. (Which makes the AI very vulnerable to player's attack). The teleport is okay because it bypasses the player completely (1:06). What would be a good practice to have the AI avoid the 'players attack zone/range' when strafing?
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you, glad you liked it 🙏❤️ Indeed the strafe for the ranged (and now the mage) enemy is annoying me as well, that's because we pick the point that's furthest away from the player and tell the enemy to go there, a better solution would be: Pick the point that's furthest away from the player, but closest to the enemy, that way we ensure that this point is never across from the player, because that will always be further away from the enemy.
@jiwik731
@jiwik731 9 месяцев назад
Hello. Awesome work as always. But is there a way how to blend animation montage by bone or something like in anim BP? Because when you are running and start to play animation montage the legs are overwritten by the montage and pawn is sliding. There have to be a way how to ignore or blend some bones in montages because stopping the whole movement in game once hit or something just to play the montage is too disruptive to gameplay. It is easy in animation BP with blend by bone but i have no idea how to do it via animation montage.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hey, thank you! Yeah you can blend the waiting animations with a montage indeed, but then you have to add an "UpperBody Slot" in your anim BP, then blend that upper body slot to the regular locomotion state (Using the 'Layered blend per bone" node) and then change the slot in the montage itself from default to upperBody
@jiwik731
@jiwik731 9 месяцев назад
​@@AliElZoheiry I knew there have to be a way. Thanks. It sounds easy enough.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hey Jiwik, just wanted to let you know that I'll be covering this exact use case (blending upper body from a montage with lower body from ABP) in my next tutorial (coming tomorrow) so hope it helps you ;)
@jiwik731
@jiwik731 9 месяцев назад
@@AliElZoheiry Oh yes.... it would be awesome. :)
@user-wo9ob9ed1r
@user-wo9ob9ed1r 5 месяцев назад
Thank you
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
You're welcome! I'm glad you found the tutorial helpful. If you have any further questions, feel free to ask.
@kellowattentertainment
@kellowattentertainment 9 месяцев назад
I have one question, can you please show us how to implement the bocking functionality for the Player Character using the damage system?
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Indeed, I was considering doing that along with the boss enemy AI, to show how to block and parry the boss attacks, so I'll probably do it sooner
@dustanschutte8724
@dustanschutte8724 9 месяцев назад
Hey there. I made my character have the blocking function just like the enemy melee. I literally copied the new blocking set up in the melee Enemy from part 12 and instead having events to call the Block, I just set a keyboard bind to start the block. So therefore, at any time you could block any incoming damage.
@Yggdrasil777
@Yggdrasil777 9 месяцев назад
Yeah, you just do the same implementation from the enemy on the player. What I do is make a base character and have the player and enemy stem from that base. Put all of the goodies on the base and implement them on the enemy via functions and events and inputs on the player.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
@@Yggdrasil777 indeed, having a common base for both the player and the enemy is a good approach, I would highly recommend it
@thefkingballschannel
@thefkingballschannel 8 месяцев назад
Ibanez JS or S series?
@AliElZoheiry
@AliElZoheiry 8 месяцев назад
S420 😉
@roydash5657
@roydash5657 9 месяцев назад
I am really so grateful for you. I wish God always helps you my dear friend. Thank you so much helping me. I am really don't know what say. You really very good person
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thank you Roy ❤️🙏
@roydash5657
@roydash5657 9 месяцев назад
@@AliElZoheiry I am really so gladly
@gavincole2015
@gavincole2015 6 месяцев назад
After creating a child of the base enemy and setting move speeds and ideal ranges, my mage does not stop moving around to attack. Carried on through part of the video and after adding blueprints to attack, still nothing. Any help would be appreciated
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey Gavin, I'm not sure I understand the problem. It's best to join the Discord server so you can ask your question there with some screenshots/videos. Link in the description
@Smyyytth
@Smyyytth 4 месяца назад
I have the same issue. The Mage is just walking around. It doesn't attack. It just jumps over the attack node in the BT and keeps walking around. Any idea?@@AliElZoheiry
@AliElZoheiry
@AliElZoheiry 4 месяца назад
If it just over the attack node, that it means it's succeeding but not attacking, but if it fails at the attack node, that means that something inside the node is not calling the finish execute. Just try to trace the code by adding breakpoints and see where it stops ​@@Smyyytth
@dynamicplayz1897
@dynamicplayz1897 6 месяцев назад
Hey so my enemy is sometimes flying up in the Teleport sequence which isnt causing it to vanish for a few seconds only to randomly interrupt the ai move to node, any idea how to fix this? I've tried using a timeline to fix its velocity of Z to be 0 at every update but that didnt help
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey, not really sure what's happening there. but note that when we teleport the enemy, we set the state to "flying" in order to zero out any ground friction, that also means that the enemy can now move up in the Z direction, so make sure that the location you are telling the AI to go to is not in the air
@dynamicplayz1897
@dynamicplayz1897 6 месяцев назад
@@AliElZoheiry it is on a flat surface, and the end location is on the same level as I checked with a debug sphere but it just flies above it sometimes
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hmm.. very strange, the only thing I can think of that would cause the character to move up and not directly to the target location if there is negative gravity or something similar pulling the AI up@@dynamicplayz1897
@dynamicplayz1897
@dynamicplayz1897 6 месяцев назад
@@AliElZoheiry I fixed it by not changing the mode to flying instead just changed the normal movement params, no idea why this happened but its all good now
@tonypauley6720
@tonypauley6720 6 месяцев назад
I have similar issues. If my level has any locations not on the flat surface, the mage flies off, sometimes never to return. To fix this I simply changed the mode to walking. There does not seem to be any issues with friction.
@legenderry25
@legenderry25 9 месяцев назад
bro... I wish everybody would create their tutorials with custom chars. Using the unreal mannequin especially when dealing with animations is pure deception.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Glad you liked that. Indeed I wanted to avoid using the mannequin to tackle any issues that have already been fixed in the mannequin without us knowing
@Maxred-92
@Maxred-92 Месяц назад
Hi Ali, thanks for this tutorial...I'm improving every day thanks to you. I followed all of your instructions but when the enemy mage cast the 'fireball', isn't direct to the player, but always in the same direction (I don't know what is aiming, but it's fixed direction) I followed all the tutorial right now: I connected the target of 'magic spell' to attack target in the BP_EnemyMage, but when I go over the 'attack target' in 'event attack', it says ''current value=none''. Have you got any suggestions? It seems like the cast doesn't read the target
@user-xv6hh8iw8m
@user-xv6hh8iw8m Месяц назад
I had the same problem
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey there, glad you're enjoying the content. If the attack target is null, make sure that you are correctly passing it from the behavior tree task where the attack function is called.
@user-xv6hh8iw8m
@user-xv6hh8iw8m Месяц назад
I fixed it yeah, I ticked Rotation Follows Velocity and Initial Velocity in Local Space and it works fine now.
@Maxred-92
@Maxred-92 Месяц назад
@@user-xv6hh8iw8m I set both, the enemy cast is correct, but the player cast isn't correct and is directed to 0,0,0. have you got suggestions?
@user-xv6hh8iw8m
@user-xv6hh8iw8m Месяц назад
@@Maxred-92 My character only has melee attacks
@Leonardo-zb6ho
@Leonardo-zb6ho 4 месяца назад
Hello, the animations of the mage loop while he walks, so he seems to teleport forth and back while walking, how can I solve this?
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Not really sure what you mean, can you describe the problem more?
@Leonardo-zb6ho
@Leonardo-zb6ho 4 месяца назад
@@AliElZoheiryTake the Walk Forward animation from Mixamo, for example. You can see the character going forward and then the animation resetting, resulting in the mage "Respawning" back in the first position and then repeating the animation. The same thing happens in unreal: the animation plays and the mesh goes forward, but then he goes back to the start of the animation over and over, resulting in it jittering while walking. Sorry if I didn't describe it perfectly and thank you a lot, you're amazing :)
@Leonardo-zb6ho
@Leonardo-zb6ho 4 месяца назад
@@AliElZoheiryIt's basically the same thing you explained in the first minutes of part 15 of this series , still I don't know how to fix it
@Leonardo-zb6ho
@Leonardo-zb6ho 4 месяца назад
@@AliElZoheiryI also followed the part 15 of this tutorial and my enemy keeps jumping over and over without landing and he also doesn't strafe anymore, sorry for disturbing so much
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Ahh sounds like you downloaded the Mixamo animation without clicking on the "In place" checkbox, this forces the animation to be in place and removes root motion, you don't want root motion in your walking animation, otherwise both the animation and the controller will move the character forward @Leonardo-zb6ho
@greatoni8452
@greatoni8452 9 месяцев назад
Ali you can making damage system? But, multiple damage system just because player should damaged not only one enemy. I am mean like a projecttile damage system but, for Melee weapons
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hey, I'm not really sure what you mean, but the damage system works for both the player and the enemy, and for both melee and projectile attacks, but if you are saying that you want me to add a melee attack to the player as well, then yes, I will do that soon
@greatoni8452
@greatoni8452 9 месяцев назад
@@AliElZoheiry Yes. It's I am mean. And I am mean character can damaged 3 enemies same time?
@greatoni8452
@greatoni8452 9 месяцев назад
@@AliElZoheiry Ali I mean the player can damaged 3 or many enemies at the same time? Multiple damage
@yingmo8041
@yingmo8041 6 месяцев назад
真强
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you 🙏
@xenocreatives6456
@xenocreatives6456 9 месяцев назад
Coooooooooooooooooooooollll!!! :)
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Glad you think so 🙏
@TheZumer
@TheZumer 3 месяца назад
We need an animation tutorial pls u r great
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Hey, thank you for your suggestion! I'll definitely take it into account for future content 😉 Do you have any specific type of animation tutorial in mind that you'd like to see?
@ambvil3222
@ambvil3222 Месяц назад
​@@AliElZoheiry Wssp Ali, it's a good suggestion from @TheZumer. A strong video as you always did on create an animation (Blender,UE?) and use it like a normal anim. Thanks again for all the knowledge bringed to the community.
@InnerspaceX
@InnerspaceX 9 месяцев назад
Hi, another idea: If ai get big damage, fall with ragdoll, and then wake up from the actual ragdoll pose.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Thanks for the suggestion Imr, I'm considering indeed something like other reactions to damage, i.e stagger, knockback, stun, etc..
@screenapple1660
@screenapple1660 9 месяцев назад
How can I create an AI enemy that can pick up a dead body over its shoulder and hide it in one of three different dumpsters, while being followed by a cop? If the player opens a dumpster and finds nothing. The cop should beat the player for lying.
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Wow that's very specific 😅 The AI logic here isn't complicated, it's just finding the location of the dead body in the world and going to it, and dough the same for a random dumpster. But you'll need a lot of animations to make it look realistic
@Lifeequipment
@Lifeequipment 9 месяцев назад
Hi bro plz make shooter enemy like call of duty
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Hey, most of the techniques I showed in this series can be applied to a shooter, so you should be able to make your own using these tutorials as well
@Сма_йлик
@Сма_йлик 9 месяцев назад
@AliElZoheiry
@AliElZoheiry 9 месяцев назад
Glad you like it ;)
Далее
I SUCK At Developing Enemy AI. Let's Fix That.
11:43
Просмотров 11 тыс.
Beautiful gymnastics 😍☺️
00:15
Просмотров 14 млн
The REAL Reason Unreal Engine VFX Looks FAKE
6:58
Просмотров 364 тыс.
I Made a Game With Only FREE Assets In Unreal Engine 5
11:45
Why Unreal Engine 5.4 is a Game Changer
12:46
Просмотров 1,1 млн
How To Make A Game Alone
16:44
Просмотров 232 тыс.
The Right Way to Spawn Objects in Unreal Engine | UE5
18:03
TEAM SPIRIT: RIYADH MASTERS 2024. FINAL VLOG
50:29
Просмотров 112 тыс.
Ц #shorts
5:15:22
Просмотров 204 тыс.