For when you finish the video, just a heads up... the 'cooldown' value in the behaviour tree and the Maths Multiply Right/Left & Forward nodes can be changed to fit your program! Mine are not exact or the "perfect" values, they are just rough values I used as I thought it looked good enough for my tutorial :D Good luck friends and thanks for watching!
For anyone having problems with strafing, change (Observer aborts/Detail/Flow Control) to “none” in (InRange/IsInRange) in both sequences in NPC_Behavior_Tree.
If you're trying this in unreal 4.26 or later, you can also use a "Select" node to randomly choose between the positive and negative (move right vs move left) vector values. Not sure if this changes the behavior by much, but it has been working alright for me (although the debug line is a bit wonky)
For anyone having problems with drawing weapon animations. If you retargeted your character and it is a new one in your Anim Graph/Layered blend per bone nodes you have to change your bones correspondingly from your ThirdPersonCharacter to your retargeted Character’a bones.
An easier way would be to consider the player to be the center of a circle. The distance from the enemy to the player is the radius of the circle. To move around the circle, add whatever random number to the rotation of the player, which represents the new angle from the center. Then, get the position of the player with the new rotation, add the distance they were at (the radius) and voila...new position on a circle!
For those that followed this and it's not working you need to go two videos ahead where he talks about attacking. Look at the Behavior Tree for the Can See Player sequence. You will notice a slightly different setup than in this video. If you use that setup everything works fine...
@@aprendiendoue5461 Sorry for my typo. It does not work for 4.27 anymore. However, I still recommend other tutorials in this series ,(if they work) because they are quicker than slow tutorials.
Has anyone else had problems trying to do in version 4.26? when I followed this tutorial for version 4.25 everything worked, but when I tried for version 4.26 it just doesn't surround the player. In the behavior tree it is set to setmovespeed and does not advance to the next behavior
@@jeremyberger7480 I researched about and there were changes in the artificial intelligence issue of 4.25/4.26 and in fact he hears changes I've already told pro beard but he said that at the moment he can't fix this problem because he's too busy with his asset in the unreal market
@@mauriciosilva1631 thanks for the reply, and in case anyone else is reads this, it seems to be skipping some tasks, and often hangs on the "find location" task where it picks the world location to strafe to. It picks the location just fine because the debug lines keep being drawn, but it seems the whole behavior tree freezes without progressing past the "find location" task
I'm having trouble with the rotating to my player. My ai looks at the player when running towards him then trails off along random trails not rotating towards the player anymore. The lines being drawn go randomly anywhere. Can't find where I went wrong.
I added a lot of enemies, but I have some problems. The enemies will bump and push each other when they try to strafe in the opposite direction, how would I fix that?
Nevermind I figured it out by duplicating the Rotate To Player task and from the controller using the Clear focus node lol. then adding the task to the begining in the false can see player part you disconnected lol
The one thing i dont like is the movement is discrete and not continuois any idea how to continuosly move it along a circle without breaking at each of those points?
Thanks amigo :) Hmm it's hard to know what's wrong without knowing exactly what is there but make sure you've got your "IsInRange" on both of your sequences!
Thanks amigo :) Hmm it's hard to know what's wrong without knowing exactly what is there but make sure you've got your "IsInRange" on both of your sequences!
I know that, but there are people who start their project without the behavior tree, and I don’t think they want to add it so can you make a lesson without the behavior tree please
@@Beardgames I checked the behavior tree at runtime and the player reference is there. I have put my behavior tree on discord. edit: nevermind I am an idiot. I disabled tick on the ai controller
Hi BeardGames. I am a young game developer and your videos are awesome but this one just doesn’t work for me. I am using UE5 and the float * float node does not exist in UE5 and multiply node just wants a X Y And Z value. I tried making float variables with the numbers that you said to put in but no luck there. PLZ help. ( I found the video that explains how to change the math nodes. This is edited in)
Can you share your AI Strafing Project😅 I am stuck, i even checked your debugging tutorial, but no help, the AI doesnt keep any space doesnt move in circle! please help me out!
Sorry amigo I don't upload my projects to TH-cam anymore! All I can suggest is to go over the video again step by step. AI really does suck haha I wish there was more I could do but I can't think of anything! Could always check out my Marketplace Asset if you want all of the good stuck with AI and combat :) I'll leave a link, let me know how you get on Amish! www.unrealengine.com/marketplace/en-US/product/flexible-combat-system/questions?sessionInvalidated=true
For when you finish the video, just a heads up... the 'cooldown' value in the behaviour tree and the Maths Multiply Right/Left & Forward nodes can be changed to fit your program! Mine are not exact or the "perfect" values, they are just rough values I used as I thought it looked good enough for my tutorial :D Good luck friends and thanks for watching!
For anyone having issues with strafing not working, I set the 'observer aborts' on the BB Condition to 'None' for both and it worked.
Thanks for sharing dude :)
Still not working :(
Thanks brilliant worked for me :)
Worked for me Tq
for anyone wondering, you should change values of the "in range" BB condition
For anyone having problems with strafing, change (Observer aborts/Detail/Flow Control) to “none” in (InRange/IsInRange) in both sequences in NPC_Behavior_Tree.
If you're trying this in unreal 4.26 or later, you can also use a "Select" node to randomly choose between the positive and negative (move right vs move left) vector values. Not sure if this changes the behavior by much, but it has been working alright for me (although the debug line is a bit wonky)
Amazing as always beard keep it upp!
For anyone having problems with drawing weapon animations. If you retargeted your character and it is a new one in your Anim Graph/Layered blend per bone nodes you have to change your bones correspondingly from your ThirdPersonCharacter to your retargeted Character’a bones.
An easier way would be to consider the player to be the center of a circle.
The distance from the enemy to the player is the radius of the circle.
To move around the circle, add whatever random number to the rotation of the player, which represents the new angle from the center.
Then, get the position of the player with the new rotation, add the distance they were at (the radius) and voila...new position on a circle!
For those that followed this and it's not working you need to go two videos ahead where he talks about attacking. Look at the Behavior Tree for the Can See Player sequence. You will notice a slightly different setup than in this video. If you use that setup everything works fine...
This tutorial no longer works in Unreal Engine version 4.26 and 4.27. After the update it is better to look for other tutorials for strafing.
@@tsehoyin2 does it work for 4.27.2?
@@aprendiendoue5461 Sorry for my typo. It does not work for 4.27 anymore. However, I still recommend other tutorials in this series ,(if they work) because they are quicker than slow tutorials.
Hey very cool that you are doing this just wants to thanks
No problem at all rein :) thanks for watching and supporting me!!
my AI doesn't follow in simulate mode but in normal game mode
Great stuff!!!
I think I'm going to have this spawn a spline on those points so it can make a complete circle around without loose its arch.
You could also use root motioned animations and call them on a randomizer If you have them.
Has anyone else had problems trying to do in version 4.26? when I followed this tutorial for version 4.25 everything worked, but when I tried for version 4.26 it just doesn't surround the player. In the behavior tree it is set to setmovespeed and does not advance to the next behavior
I'm getting the same thing, also running 4.26
@@jeremyberger7480 I researched about and there were changes in the artificial intelligence issue of 4.25/4.26 and in fact he hears changes I've already told pro beard but he said that at the moment he can't fix this problem because he's too busy with his asset in the unreal market
@@mauriciosilva1631 thanks for the reply, and in case anyone else is reads this, it seems to be skipping some tasks, and often hangs on the "find location" task where it picks the world location to strafe to. It picks the location just fine because the debug lines keep being drawn, but it seems the whole behavior tree freezes without progressing past the "find location" task
@@jeremyberger7480 it loops and gets stuck there.
In 4.27 still not working strafe movement
When creating a RotateToPlayer the Ai is stuck and no longer turns back around?
I'm having trouble with the rotating to my player. My ai looks at the player when running towards him then trails off along random trails not rotating towards the player anymore. The lines being drawn go randomly anywhere. Can't find where I went wrong.
Idk if you figured it out as well but in the AI blueprint over by pawn select "use controller rotation yaw" and it should work
@@Kyrilienx Thanks this helped me
@@Kyrilienx Love you bro
I added a lot of enemies, but I have some problems. The enemies will bump and push each other when they try to strafe in the opposite direction, how would I fix that?
I'm having an issue where the npc always faces you no matter even running around an obstacles when chasing player.
npc rotates to player and stays that way when chasing player and after losing line of sight.
Nevermind I figured it out by duplicating the Rotate To Player task and from the controller using the Clear focus node lol. then adding the task to the begining in the false can see player part you disconnected lol
The one thing i dont like is the movement is discrete and not continuois any idea how to continuosly move it along a circle without breaking at each of those points?
hi, great video but every time AI abborts when in range it just tries to find player location, it doesnt go to strafe mode
Thanks amigo :) Hmm it's hard to know what's wrong without knowing exactly what is there but make sure you've got your "IsInRange" on both of your sequences!
Thanks amigo :) Hmm it's hard to know what's wrong without knowing exactly what is there but make sure you've got your "IsInRange" on both of your sequences!
Im seriously having a hard time watching every video but still awesome videos
Haha honestly DLP it's no stress at all. I'm just extremely grateful for your support it really does mean so much so thank you dude!!
i cant make my enemy circle player and attack ... its like the selector stop the action...
4.26 or 4.25 version?
i followed everything exactly I could, and my AI is still dumb, i don't know what I did wrong, and im crying.
Can you do this without Tree of behavior
I think you can but the behaviour tree makes it a lot simpler than normal blueprinting as far as I can see :)
I know that, but there are people who start their project without the behavior tree, and I don’t think they want to add it so can you make a lesson without the behavior tree please
@@MRX-cw4qf I could take a look into that in the future sure thing :)
THANKS
Lets cinematic tutorial
set focus is not working for me for some reason
Hmm that's strange! Hard to know what's wrong but make sure you're getting the Player Reference. It might be failing for some reason
@@Beardgames I checked the behavior tree at runtime and the player reference is there. I have put my behavior tree on discord.
edit: nevermind I am an idiot. I disabled tick on the ai controller
Hi BeardGames. I am a young game developer and your videos are awesome but this one just doesn’t work for me. I am using UE5 and the float * float node does not exist in UE5 and multiply node just wants a X Y And Z value. I tried making float variables with the numbers that you said to put in but no luck there. PLZ help. ( I found the video that explains how to change the math nodes. This is edited in)
Can you share your AI Strafing Project😅 I am stuck, i even checked your debugging tutorial, but no help, the AI doesnt keep any space doesnt move in circle! please help me out!
Sorry amigo I don't upload my projects to TH-cam anymore! All I can suggest is to go over the video again step by step. AI really does suck haha I wish there was more I could do but I can't think of anything! Could always check out my Marketplace Asset if you want all of the good stuck with AI and combat :) I'll leave a link, let me know how you get on Amish!
www.unrealengine.com/marketplace/en-US/product/flexible-combat-system/questions?sessionInvalidated=true
Does this tutorial work in version 4.27.2, my hard drive would take up too much space to install Unreal engine 5?
In 4.27 Not working strafe movement