Patreon➡ bit.ly/GorkaGames_Patreon ↪Just opened my NEW DISCORD join NOW! bit.ly/GorkaGamesTH-camDiscordServer Check out MY NEW Unreal COURSE with GameDev.tv ➡bit.ly/UE5_StealthCourse_GameDevTv_GorkaGames
For those of you following this tutorial after UE5.1, you might see that the enemy gets unnloaded, where they aren't visible in your world preview, but they show up when you press play. This may cause them to stop following you after adding the Anim Blueprint to the enemy mesh. This can be fixed by going to File > Save Current level As... > Then pick a name for the level. Then when you load that level it will have the actors loaded and they will follow their animBluePrint. Hope this helps!
For anyone who has 3rd person camera collision issues with the BP_AI running into you, go into the BP_Enemy_AI blueprint and then on the "event begin play" at the top drag out and type "collision response to channel", target should be the mesh and in the "channel" drop down change it to "camera" and in the new response set it to "ignore". click compile. you're done!
This was driving me nuts @@gatheringmatter4289 lol i tried mesh, camera still glitched, i tried the capsule, same. never occurred to me to ignore both at the same time hahah thanks
Here is for everyone that is having trouble with the attack animation keeps spamming when the AI gets close but when you move back it plays the full attack montage. I found a comment from Gorka Games fixing this problem. "So in the enemy ai blueprint, delete the very first node where you set the "attack possible" to true, on the "FollowPlayer" event, and in the variables section of your blueprint set it by hand to true by default."
@@MaxwellPublishingthe problem is you don't understand Unreal engine and you're just following what other people say and that's the limit to your knowledge.
@@KB-kp2oz youre ignorant to what its like to be unknowledgeable. there is no possible way to EVER learn blueprint by trial and error. there are millions of combinations to do anything. having tutorials to help you build a few games until you understand the UI and get a grasp of the languages logic, then you can start dabbling in your own work. but a noob cant even get a single line of code out bro. just wont happen.
For Anyone having an issue with the punch not playing. make sure you have a default slot in between Your animation input and the output pose . he mentions it briefly it is important
Thank you so much! I've spent days trying to figure this out. Watched so many videos and things but this was just what I needed! I look forward to watching your other tutorials.
Your "is seeing player" variable does not change in any way. The first time this change changes from falsehood to truth, it no longer changes. In this case, there was no reason for you to stop the artificial intelligence, since the "on see pawns" function would not work. When you run behind the enemy's back, "on see pawns" does not work for the enemy, and therefore "move to" does not work either
i've spent a couple minutes thinking about this and I'm curious what the solution is. is it simply to poll line trace(s) between player and enemy? i guess theoretically, you'd probably implement a last known position, and then a patrol or search behavior from there.
I can officially say this tutorial has fried my brain for now and in a good way....I'm learning blueprints and I've been really struggling with getting my head around it all but after listening to this, it is all starting to make alot more sense now, it's still a REALLY steep learning curve but I'm detirmined to get there ... and it worked, the animations and everything...I'll watch the rest of the video tomorrow cause it's now 9:30pm in the evening and I need a break lol. - I've subscribed to your channel and I'll visit again tomorrow to learn even more.. thankyou!
hey, can you tell me how the animation worked for you? if i import it from his linked video the animations they dont move in the preview, no matter which skelleton i iuse. Could you show me what worked for u?
Hey, I just wanted to give a warning about using this channel for learning blueprints. It looks like you're pretty enthusiastic and it would be a shame if you used the wrong sources. The code in the video has a bunch of issues and the only reason it's functioning is because UE5 has some very powerful tools such as the pawnsensing component used here. You can actually replace all the lines of code for following the player with an onSeePawn event and an AI MoveTo node (connect self and player character or the pawn output from the event). The reason you can do that is because most of his code does nothing. To be more precise, the logic part (like branches and the isSeeingPlayer boolean) is completely flawed. Consider the following part of the code for example: "IF isSeeingPlayer is false THEN set isSeeingPlayer to false" Imagine if the first part of the conditional if-then (branch) statement was true, or in other words isSeeingPlayer = false. In this case, we would be a 100% sure that isSeeingPlayer is false, so setting isSeeingPlayer to false does nothing in the code. It's a little difficult to explain all the issues in a comment section, but basically this code looks like it was written by someone who has not done any coding and just tries using intuitive thinking for figuring stuff out. This is a common issue with UE5 tutorials tbh.
Honestly I'm impressed by the fact that I followed this meticulously, with the exception of what I named the ai blue print, and it just keeps giving me warnings resulting in a t posing model floating behind me. Good tutorial.
If your attack animation doesn’t play, you most likely have a skeletal mesh as your enemy body and not the character mesh with the skeletal asset assigned. - Inside of your enemy blueprint, select the "Mesh (CharacterMesh)" and in the details panel assign under mesh the skeletal mesh asset as your enemy skeleton! Hope this helps people and saves hours of trouble.
ive done this step by step an everything works except the attack animation. the AI notices me, rushes me, an stop as soon as they reach me but no animation (attack) happens. an all the "script" is right in comparision to the video. anybody got any tips for me???? please an thank you
works perfectly now i forgot to add update animation node to the rest so now is doing all animations when runing after me not just idle , and i did use another character and works fine, i also know why it didnt work manequin yesterday i had to apply each animation for it individually cause i retargeted them for other character so it works perfectly i simply had to adjust some stuff on my part , thank you so much for this i use 5.1 latest version of unreal and is perfect
Hi, I want to ask, I followed the steps as in your video but in the end mine wasn't the same as yours. The attack animation happened repeatedly, like jerking, as if the attack animation had not yet hit the main character, he repeated the attack movement over and over again. :(
Great tutorial! It has helped a lot as a a beginner. Please correct me if I'm wrong, but does the "Is seeing Player" part actually do anything? Follow player function is only triggered after isSeeingPlayer is set to True. Then the branch checking whether it is true should never go to false. And the branch doesn't even make sense - if isSeeingPlayer is False, then set isSeeingPlayer to False? For this reason it actually never makes it to the tick to stop moving. It seems the effect that the pawn doesn't see you anymore when you go behind it quickly works without any of the isSeeingPlayer logic. I also tested this.
Thanks so much! Step by Step it is very useful! And do you know how i can improve thirdpersonCamera? When the following enemy is set, the view of ThirdpersonCamera will flash back and forth due to the occlusion of the enemy.
You have to go to the camera boom in the character BP and change the length. Anything that comes in contact with this will push it forward and cause it to move. Edit: Try messing around with this a bit.
everything works besides the fact that the attack animation only gets fully played out if i keep moving after it started. else it restarts after like half a second (while the whole animation should be about 3 seconds) edit: it seems to be that the problem is that the delay is irrelevant cause somehow the whole chain after success gets triggered again and again while the animation starts so it gets started over
@@GorkaGames yes. i could even set the timer manually. it still works and runs but that somehow gets overwritten by the move to success thats been activated again and again every second or so. so the delay is running but the nodes before get activated still
@@icemanww1573 hmm alright, did you make a branch on the succes asking if we can attack and then immediately setting the canAttack variable to false? because that is what controls the overriding issue that you are having
Hey thanks man tutorial helped me alot question with my animation montage the enemy glides when the animation is playing, would there be anyway of fixing this?
at 9:57 I don't have that option to use "get owner (character movement)". I can turn off context sensitive and find it but then the nodes don't connect nor work. Do you know why this might be?? :)
Dont worry about the "Get Owner" part as instantly I just delete it. So just type "get character movement", and scroll down to the bottom, and it should appear
Hi there, thanks for the great tutorials. Most helpful. If I had a city, and I wanted npcs to just walk around follow roads. Do you have a video on that please
Hey man, thanks for the tutorial. I got an issue... Everything works fine, the enemy chases me, but when it tries to attack, it only plays about half the attack animation, and then restart the animation. The only way it completes the animation is if I run back and give it some space. Can you help me with that?
i feel like we all should be giving you some compensation for this. i dont have much money so it sucks. but i totally would if i had like more disposable income currency. if i ever do i will for sure give you something for everything you have taught me. THANK YOU
I like your simple behavior tree tutorial and it works for me. Are you planning to do any more behavior tree setups with a little more added behaviors?
You are the best friend!! Please make a video tutorial, if the enemy AI killed the player, then it continues to run to another Actor. Greetings from sunny Kazakhstan!!!
Great video but for IsSeeingPlayer I think you only set it to false when it is already false which doesn't seem like it does what you want. I think it may be unnecessary here.
Tutorial is good, and i tried from my side, but i have a problem, the AI will keep repeat attacking without following the montage length even thou i added the delay. While playing montage, the ai keep moving toward to player while it run.
Ok you did a good job making this but i feel like there were some things you really ought to have included. Like how to add an animation to the Play Anim Montage list cause I don't have that. Its hard to get through the video when you have to pause it every few minutes to look up something it didn't cover. Still thanks for the help man.
hey I'm not entirely sure on this but at 4:13 before ai move to use play 2d sound or however you are playing your sound and connect the branch - true to the play sound to the ai move to hopefully that works and good luck
Very nice tutorial. Thank you. Make some tutorial about 2.5D view (like games: Trine, Little Nightamares, Unravel). Would be nice to see these settings
yeah just go into your enemy`s blueprint, and then select its mesh, go down into collision in the details panel. And then select custom, and make the camera tick on ignore. And the same with its capsule collider. Hope it helps!
Thanks! Hmm, what do you mean exactly? By default "isSeeingPlayer" is set to false, and when it detects the player with pawn sense, it enables it. And later on every frame, it deactivates it unless the player isnt longer being detected
This was really helpful for me but I had a problem. When I tried to link the self reference to the pawn it didn't work and i'm stuck there because of it. Any way around this?
Thanks! Do you mean the self reference on the pawn on the "AI Move To" Node of the Enemy blueprint? If so, make sure you are spelling it right, there shoudnt be any problem. Check that you have context sensitive on when you right click to add a node.
@@Hollow_Tempest I have this same problem when following this tutorial. I followed exactly so far. the self will not link up to the pawn. Did you fix it?
go into the enemy`s blueprint, then select the mesh, go into the details panel, and scroll down into collision prestes. Then select custom, and check the box on ignore on "camera". Do the same for capsule collider
why when zombie follow me he run with idle animtaion? pls help edit: i dingdong, i fixed this. thx you for the video author. edit: wow zombie isn't attack, at this time i did all right
Yeah this Ai system can be implemented into any sort of character or creature that you like, just change the skeletal mesh, and the animation blueprint 😄 Yeah I have in mind making an focused tutorial on animals
@@mochapokapaw Just have the animal walk animation, and don't have the animation montage. Or you can change the montage to a different animation, like when the animal gets within range it licks you.. or whatever animations you have.
Context: Completed previous tutorial "How to create a Combat System". Than tried to add this tutorial to it using the previous BP_Dummy. Issue: AI wouldnt attack, would just stand still after chasing you. Solution: There was a double Mesh, had to use the Parent Mesh, and delete the other. Than assigned AP_EnemyAI. Problem solved. Moral of the story: Gorka Games actually followed up with me on Twitter, swapped screenshots and videos to help me solve this minor issue, And is amazing lol
Hey! So the AI does not play the attack animation at all, right? So a fix was the comment that you just highlighted, but If you have tried it and it didnt work.. Could you send me some screenshots of your code? Maybe throught twitter?
Hii there... I liked your tutorial... Just a question can this work for 2d platformer as well since i want to do the same thing where my enemy is patrolling first and when i get in his range he comes towards me and starts attacking...
just go to your enemy blueprint, look up collision in the details bar and make the collision settings to custom, then click ignore on camera. should fix the issue. (ik this is a year late but its for ppl still watching and having the same issue)
So, If I create a hockey puck that is a pawn and give the AI a pawn sensing component, is that the beginning of creating something like "defense" in a sports game?
Curious if throwing bools around each movement node is best practice, I've been doing this as well but it feels realllllly repetitive for more complex "AI"
Hi, Do you have any idea to how ask the Ai to hit the player with the behavior tree? This two tuto are kinda diffrent xDI tried to skip the "move to" because we already have the behavior tree, but it doesn't work. And the last part, when the Ai can attack, don't work :c (It work now, I have to just change animation, I have the impression, than idle withoput animation are not working with the play anim montage.
Fantastic Tutorial! I for some reason am stuck at the animat montage portion i selected 1 even though i have 2 attack montage animations to select from. When I added it to the animation towards the end of the video it just runs up and doesnt do the animation for attack. Any advice would be appreciated!
Can't get the AI to move towards my Character, rewatched multiple times. If I turn the Acceptence Radius higher it says success but doesn't move, else it just fails. It works in the default project so i guess there is something wrong with my project settings or my own ThirdPersonCharacter Blueprint. I have no idea what to do.
@@GorkaGames I did it exactly like in the video, as I said it works in the default ThirdPerson project when I copied the same Enemy Blueprint but it's not working in the project I'm trying to implement it in Edit: Fixed it by putting a delay of 0.1 after the "On See Pawn"
@@kypindor7099 I am having the same problem. Where do you put the delay? Can you explain it a bit more cause I don't see where I could put it down 0.1 delay?
So i got to the part in the video before animation so my asset should follow my player character. (I'm using an asset I made) Yet it doesn't follow my player character. Is it because it doesn't have movement like the default character you used in the video?
i have a issue, after i added the punching my enemy stopped following me and only stayed in its place and when I came close to him he just punched and when i went far from him he stopped; but before i added the punching thing my enemy was following me perfectly. Help pls!
@@hamburgerfrenchfries3777 The Thing Is, When I Created A Unreal Engine Character Class, It Did Not Add Me The Character Movement Component, Added It Manually And Now It Works
Hello! Thanks for the great tutorial. Helped me a lot. Please tell me how to make the impact animation play to the end and only then the enemy continues to run? There needs to be a condition...
at 9:21 when you click enter it doesnt add the dots on the line, and when i try to "cast to BP enemy ai" the only thing that pops up is "cast to BP thirdperson"
ran into a small error, when i try to drag and drop the blendspace into the event graph for the AP_ENEMYAI blueprint it says i cant create components from assets in a non actor blueprint. Does this have to do with the fact i chose "Blendspace" instead of "Blendspace 1D"? and if it is so, then where else am i able to choose Blendspace 1D because it didn't give me the option when I created a blendspace blueprint.
I've got a problem: for some reason, all walk and run animations that I tried to use in the WalkBlend aren't showing in a fixed point like yours, but actually the animation literally just moves to the limit, and when I play the game, the AI keeps teleporting... how can I sove this??? PS: I'm using the UEFN Mannequin
Hello, I made an attack animation for the enemy but for some reason it doesn't appear in the blueprint play montage animation options. Can you tell me why?
Also depends if you created the animation and imported it without the skeleton or tried to put it on a skeleton it wasn't made for if so you'll have to retarget the animation before anything
Hey, I'm having trouble with animations changing, it's just stuck on Idle. I feel like I've done everything right with the coding, WalkBlendSpace previews the animations properly, but once the game runs, the AI "runs" to me with an Idle animation. I've checked it's velocity, it runs at 600. I'm running it in VR, could that be the reason, or does it not matter?
Hey, yeah VR shouldn't give any issue. So if you have set up correctly the blend space, probably what is causing the issue is in the Animation Blueprint. Make sure that your "cast" is to the exact enemy blueprint.
@@GorkaGames I'm so retarded, sorry for bothering you. I missed the part where you connected "Event Blueprint Update Animation" to the cast AI. I'm very new to this, so I'm not sure how things work. Thank you!
I'm working on a 2.5 D game and I'm hoping to use this with enemy AI, but I'm not sure if it will work with an enemy that is a drone who shoots projectiles?
hey amazing tutorial vut having issuse when i fisrt tried to play my ai enemy does not move at all an i followed every step but nothing happens an if check multiply times an redid it 3 times on new maps an still no movment
Thanks for the Tutorial! There's only one problem and that's the enemy attacking. I have found a ninja attack for the enemy AI. It's got the run down but it's refusing to attack once it reaches. It seemed to work in a different project but can't find that one. Any suggestions on what might be going wrong?
Amazing tutorial! It works good in the engine but when I loaded my level from the main menu it says navmesh need to rebuild and same goes when I packaged the game the navmesh doesn't work, do you know how to fix this?
Im making a game with a lot of movement, and it doesn't really fit in with this AI, because it is very easy to get out of its line of sight. doing this would tend to make the AI just forget I was there. IS there a fix for this.
At first AI would not come at me. Not sure why this broke it but it was because I had hear pawn and sense pawn untoggled. Even though we only wrote a blue print for see pawn action it seems it requires these?
There are 2 ways you can do this: 1) By going into the enmy`s blueprint, and in the movement component, change the "max walk speed". 2) (Used if you want to change he`s speed whenever you like) drag the movement component into the event grah, and call the node "set max walk speed", and there you go 😀
@@GorkaGames thanks! I’ll do that. Your like the one ue5 tutorial guy who responds to EVERY SINGLE ONE of your audiences questions. Keep up the good work!
I have a question, what if I want the AI to wander around And attack me? Do I do everything like normal but just put another slot in the animation blueprint?
Nice Video!, A small questions, So you set the isSeeingPlayer to true in the On See Pawn event, and run Follow Player, then how is it possible for isSeeingPlayer to be false in Follow Player event?
Hey man i was following this video but when i came to testing to see if the ai would mov, he didn't it was just frozen update, i figured it out i had just placed the nevmesh thing ubove the ground
Yeah, just go into your enemy`s bluepint, and select the mesh, go into the details panel, and then scroll down into collision. Then in presets, select custom, and tick the camera on ignore. Do the same with the capsue collider
@@GorkaGames thanks bro and I know this doesn't relate to the current video but I'm looking for a solution for an attacking problem I have I added a delay to a combo move so when I press the button again it won't interrupt the combo but the delay keeps him doing the in the same place like in root motion but when I set the delay node to 0.0 he moves forward like he is supposed to can you help me out with that?
4:57 I followed everything up to here but even after adding the nav mesh it just floats and dose nothing, so I tried adding another one, and that didn't do anything, so now there's two that don't move and I'm not sure how to remove them someone please tell me how to remove objects Google, TH-cam, reddit don't help
It's not using the animation when moving, I've looked through the bp and rewatched the video a dozen times and I don't know what the problem is. Is this tutorial using 5.1 or a different version?
Patreon➡ bit.ly/GorkaGames_Patreon
↪Just opened my NEW DISCORD join NOW! bit.ly/GorkaGamesTH-camDiscordServer
Check out MY NEW Unreal COURSE with GameDev.tv ➡bit.ly/UE5_StealthCourse_GameDevTv_GorkaGames
@GorkaGames please do a tutorial of how to play and stop sounds when it sees you and stop seeing you PLEASE I am making a game and I NEED to know this
There is no any free assets here.
For those of you following this tutorial after UE5.1, you might see that the enemy gets unnloaded, where they aren't visible in your world preview, but they show up when you press play. This may cause them to stop following you after adding the Anim Blueprint to the enemy mesh. This can be fixed by going to File > Save Current level As... > Then pick a name for the level. Then when you load that level it will have the actors loaded and they will follow their animBluePrint. Hope this helps!
Idk why that works but thank you
Thank you!!!
For anyone who has 3rd person camera collision issues with the BP_AI running into you, go into the BP_Enemy_AI blueprint and then on the "event begin play" at the top drag out and type "collision response to channel", target should be the mesh and in the "channel" drop down change it to "camera" and in the new response set it to "ignore". click compile. you're done!
Also, I did just the mesh the first time and it still glitched out. Drag the Capsule collision into the target as well :)
This was driving me nuts @@gatheringmatter4289 lol i tried mesh, camera still glitched, i tried the capsule, same. never occurred to me to ignore both at the same time hahah thanks
Holy fuck, this ACTUALLY fully solved it, thank you SM!!!!
A Unreal Engine tutorial that actually makes since and isn't 20 hours long. 🙌🙌
Here is for everyone that is having trouble with the attack animation keeps spamming when the AI gets close but when you move back it plays the full attack montage. I found a comment from Gorka Games fixing this problem.
"So in the enemy ai blueprint, delete the very first node where you set the "attack possible" to true, on the "FollowPlayer" event, and in the variables section of your blueprint set it by hand to true by default."
For those who doesn't know how to do it (like me) just clic on the can attack variable and clic the box of "can attack" in the right section.
yeah but now he s attacking only 1 time, then stops
@@pixys6856 Same. Not sure how to fix...
@@MaxwellPublishingthe problem is you don't understand Unreal engine and you're just following what other people say and that's the limit to your knowledge.
@@KB-kp2oz youre ignorant to what its like to be unknowledgeable. there is no possible way to EVER learn blueprint by trial and error. there are millions of combinations to do anything. having tutorials to help you build a few games until you understand the UI and get a grasp of the languages logic, then you can start dabbling in your own work. but a noob cant even get a single line of code out bro. just wont happen.
For Anyone having an issue with the punch not playing. make sure you have a default slot in between Your animation input and the output pose . he mentions it briefly it is important
Thank you so much! I've spent days trying to figure this out. Watched so many videos and things but this was just what I needed! I look forward to watching your other tutorials.
what version of unreal engine do you have
Your "is seeing player" variable does not change in any way. The first time this change changes from falsehood to truth, it no longer changes. In this case, there was no reason for you to stop the artificial intelligence, since the "on see pawns" function would not work. When you run behind the enemy's back, "on see pawns" does not work for the enemy, and therefore "move to" does not work either
i've spent a couple minutes thinking about this and I'm curious what the solution is. is it simply to poll line trace(s) between player and enemy? i guess theoretically, you'd probably implement a last known position, and then a patrol or search behavior from there.
Bro your tutorials are insanely good.
thank you so much man!! I really appreciate it!
I can officially say this tutorial has fried my brain for now and in a good way....I'm learning blueprints and I've been really struggling with getting my head around it all but after listening to this, it is all starting to make alot more sense now, it's still a REALLY steep learning curve but I'm detirmined to get there ... and it worked, the animations and everything...I'll watch the rest of the video tomorrow cause it's now 9:30pm in the evening and I need a break lol. - I've subscribed to your channel and I'll visit again tomorrow to learn even more.. thankyou!
hey, can you tell me how the animation worked for you? if i import it from his linked video the animations they dont move in the preview, no matter which skelleton i iuse. Could you show me what worked for u?
Hey, I just wanted to give a warning about using this channel for learning blueprints. It looks like you're pretty enthusiastic and it would be a shame if you used the wrong sources.
The code in the video has a bunch of issues and the only reason it's functioning is because UE5 has some very powerful tools such as the pawnsensing component used here. You can actually replace all the lines of code for following the player with an onSeePawn event and an AI MoveTo node (connect self and player character or the pawn output from the event). The reason you can do that is because most of his code does nothing. To be more precise, the logic part (like branches and the isSeeingPlayer boolean) is completely flawed. Consider the following part of the code for example:
"IF isSeeingPlayer is false THEN set isSeeingPlayer to false"
Imagine if the first part of the conditional if-then (branch) statement was true, or in other words isSeeingPlayer = false. In this case, we would be a 100% sure that isSeeingPlayer is false, so setting isSeeingPlayer to false does nothing in the code.
It's a little difficult to explain all the issues in a comment section, but basically this code looks like it was written by someone who has not done any coding and just tries using intuitive thinking for figuring stuff out. This is a common issue with UE5 tutorials tbh.
yo gorka you're the goat, this actually helped me so much, ima go through all your vids
Honestly I'm impressed by the fact that I followed this meticulously, with the exception of what I named the ai blue print, and it just keeps giving me warnings resulting in a t posing model floating behind me. Good tutorial.
Make sure that you have followed the tutorial properly, could you be more specific on what are the warnings etc.
For my first time using the engine this was fairly easy to follow and covers enough cases to feel complete. Thanks!
starting this one now wish me luck as always GOOD JOB !!!!!!!
If your attack animation doesn’t play, you most likely have a skeletal mesh as your enemy body and not the character mesh with the skeletal asset assigned.
-
Inside of your enemy blueprint, select the "Mesh (CharacterMesh)" and in the details panel assign under mesh the skeletal mesh asset as your enemy skeleton! Hope this helps people and saves hours of trouble.
This is super helpful!!! Could you please make a tutorial on how to make an enemy that shoots projectiles? Thanks!
Thank you!! Yes, that would be a very cool tutorial to do, I will note it down!
@@GorkaGames Thanks!
whre? i cant see the note @@GorkaGames
I'm from Indonesia, you are my sensei, I have seen a lot of content and knowledge that you provide, thank you!
ive done this step by step an everything works except the attack animation. the AI notices me, rushes me, an stop as soon as they reach me but no animation (attack) happens. an all the "script" is right in comparision to the video. anybody got any tips for me???? please an thank you
Have you fixed your issue😊
So good man, very clear
Thank you! I really appreciate it!
works perfectly now i forgot to add update animation node to the rest so now is doing all animations when runing after me not just idle , and i did use another character and works fine, i also know why it didnt work manequin yesterday i had to apply each animation for it individually cause i retargeted them for other character so it works perfectly i simply had to adjust some stuff on my part , thank you so much for this i use 5.1 latest version of unreal and is perfect
you always save my butt with your tutorials, thank you.
Hi, I want to ask, I followed the steps as in your video but in the end mine wasn't the same as yours. The attack animation happened repeatedly, like jerking, as if the attack animation had not yet hit the main character, he repeated the attack movement over and over again. :(
Great tutorial! It has helped a lot as a a beginner. Please correct me if I'm wrong, but does the "Is seeing Player" part actually do anything? Follow player function is only triggered after isSeeingPlayer is set to True. Then the branch checking whether it is true should never go to false. And the branch doesn't even make sense - if isSeeingPlayer is False, then set isSeeingPlayer to False? For this reason it actually never makes it to the tick to stop moving. It seems the effect that the pawn doesn't see you anymore when you go behind it quickly works without any of the isSeeingPlayer logic. I also tested this.
you are correct but you can use the branch to set ai back to patrol or something similar instead of stopping the movement.
@@drakonis338 how do i do that?
You are right, it is not doing anything.
Thanks so much! Step by Step it is very useful! And do you know how i can improve thirdpersonCamera? When the following enemy is set, the view of ThirdpersonCamera will flash back and forth due to the occlusion of the enemy.
You have to go to the camera boom in the character BP and change the length. Anything that comes in contact with this will push it forward and cause it to move.
Edit: Try messing around with this a bit.
everything works besides the fact that the attack animation only gets fully played out if i keep moving after it started. else it restarts after like half a second (while the whole animation should be about 3 seconds)
edit: it seems to be that the problem is that the delay is irrelevant cause somehow the whole chain after success gets triggered again and again while the animation starts so it gets started over
hey, did you watch the part before minute 13:23 ? in there is the part where I control this..
@@GorkaGames yeah i think it looks exactly like yours. the interesting thing is that the delay gets triggered and even runs.
@@icemanww1573 hmm, that is very weird.. so the delay duration is set the same as the Anim Monatge duration, right?
@@GorkaGames yes. i could even set the timer manually. it still works and runs but that somehow gets overwritten by the move to success thats been activated again and again every second or so. so the delay is running but the nodes before get activated still
@@icemanww1573 hmm alright, did you make a branch on the succes asking if we can attack and then immediately setting the canAttack variable to false? because that is what controls the overriding issue that you are having
Thankyou bro! Your channel help me a lot! I learn so much thinks, just thankyou :)
thanks so much this helped im developing a game rn but im a starter
so thanks
Hey thanks man tutorial helped me alot question with my animation montage the enemy glides when the animation is playing, would there be anyway of fixing this?
I`m glad that you found it useful. Yeah I actually have a tutorial on that! th-cam.com/video/wOIlkertaLA/w-d-xo.html
@@GorkaGames thankyou
@Gorka Games It wont let me connect self to pawn im using ue5.4 bw
Great stuff! Thanks
thank you!!
THANK YOU!!! LOVED THIS TUTORIAL :D
at 9:57 I don't have that option to use "get owner (character movement)". I can turn off context sensitive and find it but then the nodes don't connect nor work. Do you know why this might be?? :)
Dont worry about the "Get Owner" part as instantly I just delete it. So just type "get character movement", and scroll down to the bottom, and it should appear
@@GorkaGames I have this same problem, the issue isn't the Get Owner part. I think they removed it with an update. We're looking for an alternative :/
I'm stuck there too, have you had any luck?
Hi there, thanks for the great tutorials. Most helpful.
If I had a city, and I wanted npcs to just walk around follow roads. Do you have a video on that please
Hey man, thanks for the tutorial. I got an issue... Everything works fine, the enemy chases me, but when it tries to attack, it only plays about half the attack animation, and then restart the animation. The only way it completes the animation is if I run back and give it some space. Can you help me with that?
Same problem here. Did you find a solution?
@@durumvfx i found if it helps now
@@Nikolailol-q3t Please!!
i feel like we all should be giving you some compensation for this. i dont have much money so it sucks. but i totally would if i had like more disposable income currency. if i ever do i will for sure give you something for everything you have taught me. THANK YOU
I like your simple behavior tree tutorial and it works for me. Are you planning to do any more behavior tree setups with a little more added behaviors?
You are the best friend!! Please make a video tutorial, if the enemy AI killed the player, then it continues to run to another Actor. Greetings from sunny Kazakhstan!!!
Thank you for watching!! Yeah good idea, I will note it down for a future tutorial!
Hello mate I did the same thing but for some reason my Ai Run to the character but wont use the hit animation
Same here, did you ever figure this out?
@@samc4235 Did you figure out?
yo i cant see the animation for attacking in the play anim montage, how can i make it appear?
Thanks for the great tutorial!!
Nice work! It really helpt to me. I was stucked because i just deleted NavMeshBoundsVolume by error ^^
haha those things always happen, thank you!
Great video but for IsSeeingPlayer I think you only set it to false when it is already false which doesn't seem like it does what you want. I think it may be unnecessary here.
Tutorial is good, and i tried from my side, but i have a problem, the AI will keep repeat attacking without following the montage length even thou i added the delay. While playing montage, the ai keep moving toward to player while it run.
same
Same br9 how could i fix this
Ok you did a good job making this but i feel like there were some things you really ought to have included.
Like how to add an animation to the Play Anim Montage list cause I don't have that. Its hard to get through the video when you have to pause it every few minutes to look up something it didn't cover.
Still thanks for the help man.
Which is the follow up video to this one for making a damage system on your player character?
new steam releases went crazy for this release 🔥
@GorkaGames please do a tutorial of how to play and stop sounds when it sees you and stop seeing you PLEASE I am making a game and I NEED to know this
hey I'm not entirely sure on this but at 4:13 before ai move to use play 2d sound or however you are playing your sound and connect the branch - true to the play sound to the ai move to
hopefully that works and good luck
Very nice tutorial. Thank you. Make some tutorial about 2.5D view (like games: Trine, Little Nightamares, Unravel). Would be nice to see these settings
how do we get rid of the glitch when the punch makes contact? should we distance the enemy?
yeah just go into your enemy`s blueprint, and then select its mesh, go down into collision in the details panel. And then select custom, and make the camera tick on ignore. And the same with its capsule collider. Hope it helps!
This is great thanks. "isSeeingPlayer" is always true though looking at your blueprint? i can't stop the ai following the player 😞
Thanks! Hmm, what do you mean exactly? By default "isSeeingPlayer" is set to false, and when it detects the player with pawn sense, it enables it. And later on every frame, it deactivates it unless the player isnt longer being detected
This was really helpful for me but I had a problem. When I tried to link the self reference to the pawn it didn't work and i'm stuck there because of it. Any way around this?
Thanks! Do you mean the self reference on the pawn on the "AI Move To" Node of the Enemy blueprint? If so, make sure you are spelling it right, there shoudnt be any problem. Check that you have context sensitive on when you right click to add a node.
@@GorkaGames alright Thanks 👍
@@Hollow_Tempest I have this same problem when following this tutorial. I followed exactly so far. the self will not link up to the pawn. Did you fix it?
Bro how to make camera not creep to a first person view when the ai runs directly behind character?
go into the enemy`s blueprint, then select the mesh, go into the details panel, and scroll down into collision prestes. Then select custom, and check the box on ignore on "camera". Do the same for capsule collider
why when zombie follow me he run with idle animtaion? pls help edit: i dingdong, i fixed this. thx you for the video author. edit: wow zombie isn't attack, at this time i did all right
How did you fix it
Just finish the video
@@dominusman382 already fixed it i dont remember what it was but i think it was a connection or something that i forgot
@@whitesheep1417 mmm no. i still didnt fixed it.
Why are you like this 😂
Hi I added the NavMeshBoundsVolume to the map but the orange box doesn't show up, is it some settings I need to enable first? Thanks!
Hi, make sure that the box is touching the ground with a big margin, and also press "P" for preview
@@GorkaGames Got it working, thank you!
Can you show how to make a health bar for this and will it work in first person template provided by unreal engine 5.
Yeah, I do have some episodes for a combat system, which covers that, but in third person: th-cam.com/video/fp5LbdC4vek/w-d-xo.html
Could this be done for animal AI? Also, would you consider making a tutorial on animal AI without combat?
Yeah this Ai system can be implemented into any sort of character or creature that you like, just change the skeletal mesh, and the animation blueprint 😄 Yeah I have in mind making an focused tutorial on animals
@@GorkaGames Thank you :)
@@mochapokapaw Just have the animal walk animation, and don't have the animation montage. Or you can change the montage to a different animation, like when the animal gets within range it licks you.. or whatever animations you have.
Context: Completed previous tutorial "How to create a Combat System". Than tried to add this tutorial to it using the previous BP_Dummy.
Issue: AI wouldnt attack, would just stand still after chasing you.
Solution: There was a double Mesh, had to use the Parent Mesh, and delete the other. Than assigned AP_EnemyAI. Problem solved.
Moral of the story: Gorka Games actually followed up with me on Twitter, swapped screenshots and videos to help me solve this minor issue, And is amazing lol
Hey! So the AI does not play the attack animation at all, right? So a fix was the comment that you just highlighted, but If you have tried it and it didnt work.. Could you send me some screenshots of your code? Maybe throught twitter?
@@GorkaGames for sure, one sec. ill get those ready.
@@GorkaGames I sent everything via messenger on Twitter. just letting you know.
Hi! This must be the problem I'm having. What do you mean a double mesh? Thanks!!!
Hii there... I liked your tutorial... Just a question can this work for 2d platformer as well since i want to do the same thing where my enemy is patrolling first and when i get in his range he comes towards me and starts attacking...
There is a camera clipping issue he hasnt discussed here but otherwise works
just go to your enemy blueprint, look up collision in the details bar and make the collision settings to custom, then click ignore on camera. should fix the issue. (ik this is a year late but its for ppl still watching and having the same issue)
is there anyways to use instead of casting? 19:50
So, If I create a hockey puck that is a pawn and give the AI a pawn sensing component, is that the beginning of creating something like "defense" in a sports game?
yeah exactly, the AI will already be able to detect and sense other objects
Curious if throwing bools around each movement node is best practice, I've been doing this as well but it feels realllllly repetitive for more complex "AI"
Im having trouble gettin this to work with a retargeted character, synty... any suggestion?
This should scale into any character, so what is what is not working? The animations?
Hi, Do you have any idea to how ask the Ai to hit the player with the behavior tree? This two tuto are kinda diffrent xDI tried to skip the "move to" because we already have the behavior tree, but it doesn't work.
And the last part, when the Ai can attack, don't work :c (It work now, I have to just change animation, I have the impression, than idle withoput animation are not working with the play anim montage.
nice job
thanks man!
Fantastic Tutorial! I for some reason am stuck at the animat montage portion i selected 1 even though i have 2 attack montage animations to select from. When I added it to the animation towards the end of the video it just runs up and doesnt do the animation for attack. Any advice would be appreciated!
have you solved it?
@just_an_internet_guy4067 nope don't think I did. I went to another project now.
Thanks tho
excellent tutorial
Can't get the AI to move towards my Character, rewatched multiple times. If I turn the Acceptence Radius higher it says success but doesn't move, else it just fails.
It works in the default project so i guess there is something wrong with my project settings or my own ThirdPersonCharacter Blueprint. I have no idea what to do.
Have you placed te NavMesh Bounds correctly on to the floor?
@@GorkaGames I did it exactly like in the video, as I said it works in the default ThirdPerson project when I copied the same Enemy Blueprint but it's not working in the project I'm trying to implement it in
Edit: Fixed it by putting a delay of 0.1 after the "On See Pawn"
@@kypindor7099 I am having the same problem. Where do you put the delay? Can you explain it a bit more cause I don't see where I could put it down 0.1 delay?
So i got to the part in the video before animation so my asset should follow my player character. (I'm using an asset I made) Yet it doesn't follow my player character. Is it because it doesn't have movement like the default character you used in the video?
have you added a nav mesh into the scene?
@@GorkaGames I added the VolumeNavMesh like you did in the video.
As in I see the highlighted green area it should be able to move in.
@@Alistr2001 ok, it might have unloaded, so try to re-open the scene.
@@GorkaGames I missed the tick box....
I have a problem, mi character turns are so snappy, i tried to fix it wth the animal tutoria, but no, pls someone help, thanks Gorka
i have a issue, after i added the punching my enemy stopped following me and only stayed in its place and when I came close to him he just punched and when i went far from him he stopped; but before i added the punching thing my enemy was following me perfectly. Help pls!
Hello! Thank you for a great tutorial, but the enemy isn't chasing me, what did i do wrong?
Now It Finally Works, Thanks!
@@1nf3rn0-v7h What did you change?
@@hamburgerfrenchfries3777 The Thing Is, When I Created A Unreal Engine Character Class, It Did Not Add Me The Character Movement Component, Added It Manually And Now It Works
Hello! Thanks for the great tutorial. Helped me a lot. Please tell me how to make the impact animation play to the end and only then the enemy continues to run? There needs to be a condition...
I'm glad I could help! So what you mean is that you want to make the enemy stop its movement when it's attacking, right?
@@GorkaGames I would like to know this too. Looking for a place in the blueprint to set enemy ai speed to 0 while playing attack animation.
More please dude 💚
I will 😀
@@GorkaGames Fantastic bud, I’m new to UE so all these little tips n tricks are huge for me 💚
@@CostaGeo6683 No problem, I am posting very frequently UE videos for people to learn from, also enjoy your UE journey!
at 9:21 when you click enter it doesnt add the dots on the line, and when i try to "cast to BP enemy ai" the only thing that pops up is "cast to BP thirdperson"
ran into a small error, when i try to drag and drop the blendspace into the event graph for the AP_ENEMYAI blueprint it says i cant create components from assets in a non actor blueprint. Does this have to do with the fact i chose "Blendspace" instead of "Blendspace 1D"? and if it is so, then where else am i able to choose Blendspace 1D because it didn't give me the option when I created a blendspace blueprint.
On the left side window open the "AnimGraph" under "Animation Graph" can drop it in even graph
I've got a problem: for some reason, all walk and run animations that I tried to use in the WalkBlend aren't showing in a fixed point like yours, but actually the animation literally just moves to the limit, and when I play the game, the AI keeps teleporting... how can I sove this???
PS: I'm using the UEFN Mannequin
Hello, I made an attack animation for the enemy but for some reason it doesn't appear in the blueprint play montage animation options. Can you tell me why?
make sure that you have right clicked the animation clip, selected "Create" and then "animation montage"
Also depends if you created the animation and imported it without the skeleton or tried to put it on a skeleton it wasn't made for if so you'll have to retarget the animation before anything
Hey, I'm having trouble with animations changing, it's just stuck on Idle. I feel like I've done everything right with the coding, WalkBlendSpace previews the animations properly, but once the game runs, the AI "runs" to me with an Idle animation. I've checked it's velocity, it runs at 600.
I'm running it in VR, could that be the reason, or does it not matter?
Hey, yeah VR shouldn't give any issue. So if you have set up correctly the blend space, probably what is causing the issue is in the Animation Blueprint. Make sure that your "cast" is to the exact enemy blueprint.
@@GorkaGames I'm so retarded, sorry for bothering you. I missed the part where you connected "Event Blueprint Update Animation" to the cast AI. I'm very new to this, so I'm not sure how things work. Thank you!
@@GorkaGames i have the same problemm and my cast is 100% sure good. idk how to fix it... acceleration for path is true too :(
i did all steps in order and seem to have trouble applying the animation to the AI just stuck on a tpose
Did you asign correctly the Blendspace Horizontal axis values? From 0 to the enemy`s max speed?
I'm working on a 2.5 D game and I'm hoping to use this with enemy AI, but I'm not sure if it will work with an enemy that is a drone who shoots projectiles?
hey amazing tutorial vut having issuse when i fisrt tried to play my ai enemy does not move at all an i followed every step but nothing happens an if check multiply times an redid it 3 times on new maps an still no movment
Nothing happens when I hit p after adding the navmeshboundsvolume what am I doing wrong?
2:44
Thanks for the Tutorial! There's only one problem and that's the enemy attacking. I have found a ninja attack for the enemy AI. It's got the run down but it's refusing to attack once it reaches. It seemed to work in a different project but can't find that one. Any suggestions on what might be going wrong?
Amazing tutorial! It works good in the engine but when I loaded my level from the main menu it says navmesh need to rebuild and same goes when I packaged the game the navmesh doesn't work, do you know how to fix this?
how do you make a new blueprint? im very sorry if this question is dumb its just that i never uesd unreal and im very new to it
Right click in your content browser! (:
Im making a game with a lot of movement, and it doesn't really fit in with this AI, because it is very easy to get out of its line of sight. doing this would tend to make the AI just forget I was there. IS there a fix for this.
You can just adjust its sight radius and vision angle to fit your requirements
其实不需要followPlayer这个函数,直连AI MoveTo然后pawn to pawn就更简洁了。
all work fine and trinky ! mercy !!!
At first AI would not come at me. Not sure why this broke it but it was because I had hear pawn and sense pawn untoggled. Even though we only wrote a blue print for see pawn action it seems it requires these?
Is there a way to adjust the speed of the enemy when it chases you? was looking around the video, couldn't find anything
There are 2 ways you can do this:
1) By going into the enmy`s blueprint, and in the movement component, change the "max walk speed".
2) (Used if you want to change he`s speed whenever you like) drag the movement component into the event grah, and call the node "set max walk speed", and there you go 😀
@@GorkaGames thanks! I’ll do that. Your like the one ue5 tutorial guy who responds to EVERY SINGLE ONE of your audiences questions. Keep up the good work!
I have a question, what if I want the AI to wander around And attack me? Do I do everything like normal but just put another slot in the animation blueprint?
Nice Video!, A small questions, So you set the isSeeingPlayer to true in the On See Pawn event, and run Follow Player, then how is it possible for isSeeingPlayer to be false in Follow Player event?
Hey man i was following this video but when i came to testing to see if the ai would mov, he didn't it was just frozen
update, i figured it out i had just placed the nevmesh thing ubove the ground
Hey man, make sure that you have set the navmesh correctly
Do you know how to stop the camera from going inside the enemy character when he gets too close when the camera rotate
Yeah, just go into your enemy`s bluepint, and select the mesh, go into the details panel, and then scroll down into collision. Then in presets, select custom, and tick the camera on ignore. Do the same with the capsue collider
@@GorkaGames thanks bro and I know this doesn't relate to the current video but I'm looking for a solution for an attacking problem I have I added a delay to a combo move so when I press the button again it won't interrupt the combo but the delay keeps him doing the in the same place like in root motion but when I set the delay node to 0.0 he moves forward like he is supposed to can you help me out with that?
this video is great. only issue im having is my ai seems to move way to fast no matter what i set and runs past me then rubberbands back to behind me
thanks! make sure that in its Character Movement component he has the "Max Walk Speed" set to a lower value
4:57 I followed everything up to here but even after adding the nav mesh it just floats and dose nothing, so I tried adding another one, and that didn't do anything, so now there's two that don't move and I'm not sure how to remove them someone please tell me how to remove objects Google, TH-cam, reddit don't help
Managed to get the AI walk towards me and he’s in idle when near me but he isn’t attacking, is it something wrong I did in the animation montage?
Make sure that you are calling properly the events and make sure that the enemy has a default slot in its animation blueprint
at 9 : 7 when i drag blendspace its showing me two options Speed and None
It's not using the animation when moving, I've looked through the bp and rewatched the video a dozen times and I don't know what the problem is. Is this tutorial using 5.1 or a different version?