Unreal Engine 4 - AI Chasing The Player & Drawing Weapons

  Рет қаралды 10,140

Beardgames

Beardgames

Күн бұрын

Пікірлер: 37
@amandaholman3479
@amandaholman3479 2 жыл бұрын
So a small edge case I found at the 5:30 mark for anyone else who gets stuck. If you start your player outside the AI navmesh bounds, the AI won't move at all along the spline until after the AI sees you. I think the CanSeePlayer bool is null at game start if the player is not in the navmesh bounds. My fix was to copy the Set Value as Bool, Get Blackboard, and Make Literal Name nodes after the Run Behavior Tree node on Event BeginPlay. Also, if your AI stops moving at some point around the spline, you might need to lower the AIPerception Sight Radius and Lose Sight Radius values. My AI was seeing my character from across my test map completely outside the Navmesh. The behavior tree doesn't know what to do and will just stop the AI from moving at all.
@seriosarge
@seriosarge 2 жыл бұрын
Thanks for the tip! I realy wondered, why he keeps drawing weapon all the time, then fails to move at all. Reducing his sight helped (so he detected player and also another mob at the far away of the map). Also tested starting player outside navmesh bounds - seemed fine to me. Only probem I have for now - animations is jerky, no matter of cube (aka patroling) speed.
@soundotacu
@soundotacu Жыл бұрын
Thanks !!!!!!!
@neyverh123
@neyverh123 3 жыл бұрын
thanks for this tutorial I am learning a lot from this. Now I gotta watch this video 4 to like 5 times to get it glued into my brain lol.
@Beardgames
@Beardgames 3 жыл бұрын
keep it up neyverh :D
@devilhunter9618
@devilhunter9618 3 жыл бұрын
My NPC does not want to draw the weapon on me,what could the cause be? I watched the video multiple times and cant figure it out
@overlandgames
@overlandgames 2 жыл бұрын
In the event overlap section of the spline i appear to be getting some kind of error. My AI run along the spline, then they see the player character, and chase after him, but if i move the player character, the cube on the spline starts moving again (indicating it's being overlapped by an AI, even tho, AI is very far away.) this causes some of the AI to abandon the player and go back to the spline, causing an endless tug of war for the ai group, two will stay w/ the player, 2 will go w/ the spline, then both sets will bounce back and forth the further away they get from either (player or spline location ) any ideas?
@natecoet3291
@natecoet3291 3 жыл бұрын
Perfect video :) and by the way I purchased your asset pack on the epic marketplace, I'm eager to use it for my first project.
@Beardgames
@Beardgames 3 жыл бұрын
Hey nate! Thanks so much buddy let me know if you have any questions I can help with 😊
@natecoet3291
@natecoet3291 3 жыл бұрын
@@Beardgames sure, thanks mate.
@TheGhos1Face
@TheGhos1Face 3 жыл бұрын
Oh the beard is backk!!!
@Beardgames
@Beardgames 3 жыл бұрын
Hahah sup Kobe. Will do my best to upload more regularly ;)
@brunosemerek
@brunosemerek 3 жыл бұрын
I do not get one thing. On 9:34 You have Draw and Sheathe events in places where there were left and right click for player character, and then You have same events again on 10:24, where they should be. Where I should put these events ?
@brunosemerek
@brunosemerek 3 жыл бұрын
Oh, I already found it out. Those were the custom events ready to be used when teaching our little happy NPC how to smash things ^^. For this part I ignored it and just used Draw Sword and Sheathe Sword events in order to start playing animation, so animNotify events can handle the rest. But I have one question. Lets say I have several childs made from NPC parent bp. Those childs are various enemies with their own weapon. Is there any way how to set this weapon through variable, or I have to relly on packing the weapon mesh with the NPC ?
@rizchaud
@rizchaud 3 жыл бұрын
I would like to add a sound when he chase but the task repeat the sound at every time he get location, how can i add a "chase sound" pls ? and of course your videos are perfect !
@MartKart8
@MartKart8 Жыл бұрын
I followed these tutorials and my character, when going around the spline, now faces the direction my player is, while running around the spline path?
@blenderzone5446
@blenderzone5446 3 жыл бұрын
Great thanks for sharing this tutorial!
@Beardgames
@Beardgames 3 жыл бұрын
Thanks for watching metal!!
@egekara684
@egekara684 3 жыл бұрын
Awesome video as always. But I have a problem. I am creating a 2 Classed RPG System. NPC doesn't follow me. Is that because when I use GetPlayerCharacter the game can't figure out which Player Character I am talking about ? How can I fix this ?
@iramo2433
@iramo2433 3 жыл бұрын
Hey Beard dude I love how you explain your vids and also at the end of the vid you recap your doing good But I have a question what If my character im gonna use dont have a weapon for 8:59
@Beardgames
@Beardgames 3 жыл бұрын
Hey ramo really glad you're enjoying the content :) so if you don't have a weapon you can just ignore the drawing weapon part. You might need to still change the weapon drawn variable to true though as this will affect some of the animations
@iramo2433
@iramo2433 3 жыл бұрын
@@Beardgames Thank you so much And also I will im,plement this for my other chars so I made a Naruto Model and want him to use His Kunai(A mini katana) And I followed your tut on picking up weapons and When I walk to it and press E it makes the kunai dissapear As if i picked it up but its not in my slot that I put Also thank you for replying Most Dont even see their comments
@iramo2433
@iramo2433 3 жыл бұрын
@@Beardgames nvm ffixed it thx
@adityapolavarapu6586
@adityapolavarapu6586 3 жыл бұрын
@@Beardgames Sir, i have a problem the NPC keeps on playing the draw sword animation and the sword also does not attach to him can you help me out.
@pandamonium3422
@pandamonium3422 3 жыл бұрын
The NPC plays the animation of draw sword but the sword does not attach to his hand how can I fix this? Also the Drawing sword animation keeps on playing
@yahyasharingan6103
@yahyasharingan6103 3 жыл бұрын
I Have Same Problem Like You... Could fix this? beard plaese help...drawAnimation of npc Repeating Again and Again
@ImpeGa123
@ImpeGa123 3 жыл бұрын
@@yahyasharingan6103 I Had the same problem ( i was calling the wrong event in the NPCAnimBP.) Hope This will help :)
@feuerbrenntgut
@feuerbrenntgut 2 жыл бұрын
The reason it isn't working is because he calls the attach weapon events in the animation BP with anim Notifys. Watch his Draw/Sheath Weapon tutorial for more information. You have to do the same for the in the AI Animation BP for it to work properly.
@justinrivera7800
@justinrivera7800 2 жыл бұрын
Make sure when you call the AttachWeapon Event you are putting Hand_RSocket as the Socket Name not weapon_back
@Sysiaokia
@Sysiaokia 3 жыл бұрын
hi, when i put 2 character together ,this bt has not working,both monster only stand at there
@ThiGrunfeldt
@ThiGrunfeldt 3 жыл бұрын
Hi guys! Thank u so much for the tuts Beard! So, if i have more then 1 NPC how to handle the one TargetLocationRef at BB? should i +1 for every npc?
@Beardgames
@Beardgames 3 жыл бұрын
Any time Thiago! So when each AI is assigned the BT they will all use variables specific for them only, you should be able to freely add in more AI without changing anything my friend :)
@RoryMcC42
@RoryMcC42 3 жыл бұрын
Awesome content yet again
@Beardgames
@Beardgames 3 жыл бұрын
Thanks so much dude :)!
@realdlps
@realdlps 3 жыл бұрын
(Insert funny joke) I really would like to work on a game but school is taking way too much time rn
@Beardgames
@Beardgames 3 жыл бұрын
Haha don't over work yourself my dude :)
@Surzom
@Surzom 2 жыл бұрын
too fast, pls go slower
Unreal Engine 4 - AI Look at & Circle Player (Strafing)
12:32
Beardgames
Рет қаралды 20 М.
Unreal Engine 4 - Dealing & Taking Damage
12:33
Beardgames
Рет қаралды 20 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
3D Snowman Challenge (with Maxon and Perception)
1:35:40
Maxon Red Giant
Рет қаралды 281
Iron Lung is not as bleak of a setting as people think(sorry)
19:16
Unreal Engine 4 - Blocking Attacks (AI & Player)
17:31
Beardgames
Рет қаралды 16 М.
Throwing Objects/Ball in Unreal Engine 5.4
19:50
Code With Ro
Рет қаралды 6 М.
3D AI Model Generation is Getting GOOD - UE5.4 Unreal Engine
12:25
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 621 М.
AI Perception - Unreal Engine Action RPG #30
11:38
CodeLikeMe
Рет қаралды 2,9 М.
Unreal Engine 4 - Character & AI Strafe Movement
6:01
Beardgames
Рет қаралды 19 М.
Enemy A.I. Shooting Projectiles (+ Damage) | UE5 Tutorial
11:47
Buvesa Game Development
Рет қаралды 21 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН