AI Random Roam With Chase | Part 2 - Unreal Engine 4 Tutorial

  Рет қаралды 24,155

Matt Aspland

Matt Aspland

Күн бұрын

Пікірлер: 87
@MattAspland
@MattAspland 3 жыл бұрын
If you are looking for part 1, it is here: AI chase with sight detection. This is where we set up the chase code! :) kzbin.info/www/bejne/hWmbgaqCdr50pcU
@rafhamine1792
@rafhamine1792 3 жыл бұрын
I never skip your ads, because the videos are so good! Nice tutorials
@TheF4c3m4n
@TheF4c3m4n 4 жыл бұрын
Really good setup there Matt! Straight to the point as always! Thanks.
@MattAspland
@MattAspland 4 жыл бұрын
Thank you so much, glad you enjoyed and no problem :)
@Lad11971
@Lad11971 2 жыл бұрын
You are by far the best ue4 tutorial Channel. I keep scrolling down on your channel and everything you show is exactly what I need you just earned a subscriber good job man!
@alexeinuville2555
@alexeinuville2555 Жыл бұрын
Best tutorials. I'm building my whole student project with your tutorials. You're awesome
@stalp0pp
@stalp0pp 4 жыл бұрын
The tutorial I needed and it does not last 8 hours. THANKS!
@MattAspland
@MattAspland 4 жыл бұрын
Ha no problem, glad I could help you out :)
@cginteractive7263
@cginteractive7263 3 жыл бұрын
7 hours of it is just covering the things you already know or just trying to over explain something that's way more simple to do than they make it sound
@ak-gi3eu
@ak-gi3eu 4 жыл бұрын
I like quick tutorials whether it's big or step by step ...I love it
@MattAspland
@MattAspland 4 жыл бұрын
Thank you man, happy to help and glad you enjoyed it :)
@langianimations416
@langianimations416 4 жыл бұрын
Okay, so you are probably tired of hearing from me but I just wanted to say thank you for these tutorials, this ai one worked perfectly! and I added a random node to the distance he travels to make it more realistic (:
@MattAspland
@MattAspland 4 жыл бұрын
Don't worry, talk whenever you like :) And thank you man, I'm glad it worked for you. That's a great addition to, adds a little extra to it. Well done mate :)
@timsonss
@timsonss 4 жыл бұрын
Oh I also thought of something for this AI. Maybe you could implement AC Unity style AI, when he loses you, he will go to the last place he saw you
@MattAspland
@MattAspland 4 жыл бұрын
Yeah that's a great idea, I can look into that :)
@relaygaming3308
@relaygaming3308 4 жыл бұрын
Great tutorial Matt! Much easier to handle an AI like this as opposed to using a Behavior Tree. Could you do an Ai tutorial but for a companion Ai? Like the Ai follows you around and you can tell them to stop moving/stay where they are with the press of a input? There arent many companion sort of Ai videos out there and If you know how to i'd love to see it in your style of video.
@MattAspland
@MattAspland 4 жыл бұрын
Thank you man, and yeah I agree. An companion AI is definitely something I can look into yep :)
@ItsFink
@ItsFink 2 жыл бұрын
Both enjoyable and helpful thank you
@JustZiReacts
@JustZiReacts 4 жыл бұрын
Thanks so much for these tutorials. As a newbie to Unreal these are very helpful❤
@MattAspland
@MattAspland 4 жыл бұрын
No problem, happy to help man :)
@bonedragon5077
@bonedragon5077 2 жыл бұрын
This is such a great series. I'm learning so much. I was wondering if there was a way to get the AI character to turn to their destination before moving to it. Thanks so much!
@laurahoward3798
@laurahoward3798 3 жыл бұрын
These videos are so helpful and save me hours of frustration, always. Could you make a tutorial plugging how the Ai reacts to special character movements? Like a decreased chance of being seen if the player is crouched... I have a move to toggle a camo ability but not sure how to plug this into the ai’s brain (stuff like that)
@MattAspland
@MattAspland 3 жыл бұрын
Thank you man, always a pleasure to help :) And that's a great suggestion, I can definitely add that to my list :)
@TuxedoVaileGAMES
@TuxedoVaileGAMES Жыл бұрын
Why does the AI keep abandoning the chase? After the last video, everything worked perfect but as of adding the random roam the AI constantly stops chasing the player almost as quickly as it begins. I've rewatched this video several times and as far as I can tell, everything is setup exactly as you've instructed. I'm so confused... Edit: I think I found a fix, not sure which change did it though - I set all of the pawn sensing attributes back to default like the sight radius and whatnot and then I also switched the "retriggerable delay" node from the last video to 2 seconds instead of 0.6. Edit 2: The above fixes weren't consistent enough, I have also gone ahead and added a player reference to the target of the "Get Actor Location" node at 2:55. This causes the AI to always be moving toward the general direction of the player even when the chase logic breaks which avoids the issue of it randomly walking away from the player mid-chase. As I am making a horror game, this works quite well for me as it makes it feel as if it is actively hunting the player.
@ericcrary2380
@ericcrary2380 9 ай бұрын
Also making a horror game, thank you for the updates on your solution!
@ASTRAL15293
@ASTRAL15293 9 ай бұрын
What node did you use? please tell me!
@timsonss
@timsonss 4 жыл бұрын
Nice mate, maybe do Among Us or Fall Guys AI, mechanics (grab like in Fall Guys or vent like in Among Us) tutorials. Oh and also maybe hiding in closet or vent or smth like in Alien Isolation (so that you can peek as well and if you stat for too long AI will find you inevitebily)
@MattAspland
@MattAspland 4 жыл бұрын
Hey, thank you man, I can look into some of those, thanks again :)
@timsonss
@timsonss 4 жыл бұрын
@@MattAspland yeah man I will try to always write some new ideas
@MattAspland
@MattAspland 4 жыл бұрын
Yeah thank you :)
@jaydondoesstuff
@jaydondoesstuff 4 жыл бұрын
Can you make a tutorial for taking damage by the AI and maybe also a tutorial for a game over screen?
@MattAspland
@MattAspland 4 жыл бұрын
I can add those to my list yep :)
@abdullahsohail5395
@abdullahsohail5395 4 жыл бұрын
Liked your video nice work
@MattAspland
@MattAspland 4 жыл бұрын
Thank you so much man :)
@monke1709
@monke1709 2 жыл бұрын
this tutorial is very helpful but i have 1 Probleme when the AI is in chase mode it will still sometimes random Roam and walk away from me also because he still moves somewhere els when he is chasing me when he catches me he will play the animation and then run to a randome location can i somehow stop the roaming of him when he is in chase mode. My other question is if its possible to make the player stop moving when he catches me and the screen fade out
@aleksboboychev
@aleksboboychev Жыл бұрын
Thank you!
@bricktube3871
@bricktube3871 3 жыл бұрын
my enemy won't start detecting me unless I move. After I move once, the behavior is as in your video (mostly). Any idea why this might be?
@ross4334
@ross4334 4 жыл бұрын
This is amazing and learnt so much from you already! Love you nodes series as it is really daunting as a newcomer to UE4 and blueprints! Is there a way to make the AI only roam in a certain place? Like on a material type on the ground or within an area. Like if you had villagers roaming I don't want them to randomly walk away from a general area. So i guess, weighted roaming. Also, can you show a countdown where the AI is searching around the last known position before moving back to their last position or patrol point or group
@MattAspland
@MattAspland 4 жыл бұрын
Thank you so much, glad you are enjoying it and learning loads :) Also an easy way of doing this would have the NavMesh area only fit that area, like the village. You can have multiple meshes so you can put some else where too. Also, I can look into doing that yeah :)
@ross4334
@ross4334 4 жыл бұрын
@@MattAspland Ah yes, i've played with the Unity navmesh, i assume you can set the areas to certain types and then they find a random point in sphere that is on the navmesh village?
@MattAspland
@MattAspland 4 жыл бұрын
Yeah you can, sounds like it is very similar to Unity then, you should pick it up fairly easily :)
@creedwire
@creedwire Жыл бұрын
great tutorial, but i have a problem, and somehow i cant figure it out. I'm programming the ai on the same event graph that i programmed the chase on. But during the chase programming i already used event tick, and now it doesn't let me use event tick. Instead it takes me back to where i used event tick in the programming of the chase. I think this isn't a problem, i think its maybe a kind of rule in unreal engine 4 idk. Any advice on this?
@elrankey4062
@elrankey4062 2 жыл бұрын
hello good, I have some problems and it is that once the enemy sees me he does different things, or he sees me and even if he continues to see me he leaves, or once he sees me he does not stop following me, I need help :(
@dmamet7564
@dmamet7564 4 жыл бұрын
Hey so im here from the menu video and it helped with the AI a lot thank you so much. However, sometimes when it doesn't chase after me, it runs and stops, you know how to fix that
@MattAspland
@MattAspland 4 жыл бұрын
Hey, no problem, glad I could help. And do you mean, it runs stops and then runs again? If so, this is it doing it's random roaming
@dmamet7564
@dmamet7564 4 жыл бұрын
@@MattAspland oh ok
@dmamet7564
@dmamet7564 4 жыл бұрын
@@MattAspland i mean it runs, then stops and doesn't continue the free roaming thing
@MattAspland
@MattAspland 4 жыл бұрын
Oh right okay, that might be how you are setting the variables then, have you double checked your code to make sure there are no mistakes anywhere?
@coda4115
@coda4115 2 жыл бұрын
Any advice on how I could add animation when Ai stops?
@Balderix
@Balderix Жыл бұрын
what do i do if i didnt set up chase music?
@alphaz964
@alphaz964 2 жыл бұрын
how can I download it? My character won't move and chase me :c
@warfighter4129
@warfighter4129 2 жыл бұрын
I have an issue where the AI will get distracted while chasing the player and begin random Roaming. In a sense they give up chase and literally run away from you lol. If anyone has a solution that`d be a great help. Edit: I figured it out. I removed the event tick and connected the sequence directly to the "Set Can See Enemy? False" This prevented the AI from wanting to Random Roam every tick, and I'm sure reduced lag somehow. So now after the AI cannot see the player for whatever time I have set, they will drop chase and random roam. Still trying to figure out how to have only 1 track of chase music play even if the player is being chased by multiple enemies.
@beastlife
@beastlife Жыл бұрын
I have the same problem but your solution doesnt work for me.
@warfighter4129
@warfighter4129 Жыл бұрын
@@beastlife Honestly the ai are still buggy for me too, if we want something more in depth we'll probably have to look elsewhere for a more advanced ai. Matts tutorial is pretty good for starting out tho!
@beastlife
@beastlife Жыл бұрын
Yeah well i did the same you did and the AI didnt even roam. I dont really care if its buggy it just gotta work.
@elrankey4062
@elrankey4062 2 жыл бұрын
hello good, I have a problem and I don't know why when my enemy moves he makes a very sudden movement when changing direction
@brokenminds9701
@brokenminds9701 2 жыл бұрын
Can u do with 2 tipes of sound The chase and the main theme and if he catches you a jumpscare I'm interestet to know how it would be
@Palexite
@Palexite 3 жыл бұрын
I got the free roam to work, but for some odd reason, I looked over it so many times but I cant see what im doing wrong. All of the sudden, the AI is not reacting when im in front of it. Ive made the pawn, and the nav mesh bounds.
@MattAspland
@MattAspland 3 жыл бұрын
Hey, this might be an issue with the Booleans you are setting, so whether or not it can chase or not. Have you made sure that all of the default values are correct and that you are setting them correctly?
@Palexite
@Palexite 3 жыл бұрын
@@MattAspland no worries I actually fixed It! Thanks!
@MattAspland
@MattAspland 3 жыл бұрын
Oh great news! No problem :)
@stickyanimates5313
@stickyanimates5313 2 жыл бұрын
thanks you
@ASTRAL15293
@ASTRAL15293 9 ай бұрын
What can i do if AI just goes where he wants while chasing???
@MrJulyCrab
@MrJulyCrab Жыл бұрын
I have a problem, my problem is that when it is chasing me, he goes back to his roaming position, and ignores me
@mintytavor8332
@mintytavor8332 2 жыл бұрын
Thx
@chadrat5129
@chadrat5129 2 жыл бұрын
i got a problem the audio doesnt fade out when i get away from said enemy
@Game_Studio-w9p
@Game_Studio-w9p 8 ай бұрын
please make it when the main character is captured after that chase action
@brokenlens7377
@brokenlens7377 3 жыл бұрын
thanks bro Nice video! can you make a vid on game items that can be picked up and found in random places like granny game items
@MattAspland
@MattAspland 3 жыл бұрын
Thanks man, and sure I can look into it. I have 2 videos similar to those, let me know if they help :) Randomly spawning items: kzbin.info/www/bejne/npWkgGlmbp19r5I Basic Pickup: kzbin.info/www/bejne/Y5emhmiOhs6tkKs
@brokenlens7377
@brokenlens7377 3 жыл бұрын
@@MattAspland thanks dude
@MattAspland
@MattAspland 3 жыл бұрын
@@brokenlens7377 No problem :)
@cginteractive7263
@cginteractive7263 3 жыл бұрын
so do we delete anything from the player blueprint or just certain things?
@OKRE303
@OKRE303 Жыл бұрын
its a really good tutorial but for some reason when the AI is chasing me it stops and goes away from me
@Alex00m
@Alex00m 4 жыл бұрын
😁👍
@Alex00m
@Alex00m 4 жыл бұрын
Cool one bro like that music 🎶 I learn something new, thank you 😊👍
@MattAspland
@MattAspland 4 жыл бұрын
Thank you man, glad you learned something :)
@BabeeGravy
@BabeeGravy 3 жыл бұрын
broooooooooo how the hell do you not have more subscribers?! I'm low on cash rn (Christmas stuff F my life) but I'll give ya some PayPal later
@MattAspland
@MattAspland 3 жыл бұрын
Thank you so much man! And don't feel like you need to, but I really appreciate you saying that! Thank you :)
@1.1st
@1.1st Жыл бұрын
Bro how i Speed ​​up the enemy when he sees me ?
@kreenbopulusmichael7205
@kreenbopulusmichael7205 3 жыл бұрын
enemies seem to completely freeze when my character jumps, is there a fix for this ?
@MattAspland
@MattAspland 3 жыл бұрын
Hey, I'm not sure why that would be happening, maybe you are jumping out of their sight? Try increasing their sight radius and the angle they see at, see if that helps.
@elrankey4062
@elrankey4062 3 жыл бұрын
how to do to slow it down?
@MattAspland
@MattAspland 3 жыл бұрын
To slow down the AI, you can lower it's "max walk speed" in it's "character movement" in it's blueprint. The same way you slow down the player movement speed.
@supperfprs5102
@supperfprs5102 3 жыл бұрын
how do you make so the ai kills you
@jonssu0000
@jonssu0000 2 жыл бұрын
I'm not sure if you've got an answer for that yet but on the upper "AI Move To" there is a thing called "On Success" so what ever you plug in that will happen when the AI reaches the player for example a jumpscare sound or something.
@GoofierClock
@GoofierClock Жыл бұрын
Doesn't work edit: nvm it does
AI Patrol | Custom Locations - Unreal Engine 4 Tutorial
6:21
Matt Aspland
Рет қаралды 22 М.
AI Sight Detection And Chase With Music - Unreal Engine 4 Tutorial
10:51
CAN YOU DO THIS ?
00:23
STORROR
Рет қаралды 41 МЛН
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 15 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 53 МЛН
I tricked MrBeast into giving me his channel
00:58
Jesser
Рет қаралды 22 МЛН
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 545 М.
Voxel Ray Tracing
5:16
7 Bits Per Byte
Рет қаралды 264 М.
Change Volume Settings UE5 Tutorial Save and Load pt.1
31:24
Sprinting And Stamina - Unreal Engine 5 Tutorial
17:00
Matt Aspland
Рет қаралды 74 М.
Easily Make Ai Animals That Chase And Flee In Unreal Engine
16:20
Elusive Panda
Рет қаралды 19 М.
The ENTIRE History of the First Galactic War - Helldivers 2
18:28
Super Earth Salute
Рет қаралды 63 М.
Why Do Video Game Studios Avoid Blender?
6:49
The Cantina
Рет қаралды 666 М.
CAN YOU DO THIS ?
00:23
STORROR
Рет қаралды 41 МЛН