4:06 Anybody using this for a UE5 project, use the * to find Multiply and select it. The bottom pin will be Yellow by default. Right click on the bottom pin and go down to Convert Pin, then click Float. There are 2 options (single and double precision) to choose from, but I used the single-precision float. As always, thanks for the upload, Matt...you condensed what others try to explain in an hour down to a 9 minute video that is easy to follow 🤘😎🤘
For anyone making a 2.5D sidescroller: I had an issue with the AI only moving away when the player is on one side of the AI and wouldn't do anything when the player is on the other side. To fix this, if anyone has this issue, instead of putting GetActorLocation of the enemy into the Add node I put GetActorLocation of the player into the Add node and that fixed it. That simple. Obviously having to mess with what axes I used in the Break and Make Vectors as well. Just for anyone's reference. Otherwise, this tutorial was great! Simple, clear, and easy to understand. I love that you just speed through these and explain things as you go. Trusting our intelligence and ability to pause and rewind the video. No unnecessary droning on. Great job!
My work around was making a scene in the actor blueprint, make them face player, change rotation180° and ai move to the scene location with a event by time it wasn’t pretty lol
I'm currently working on your deer tutorial but wanted to make some modifications so I'm breaking the whole thing and figuring out how it all works so I can make it do things I want. I'm getting the hang of it. Completely got rid of the whole hunger system and just made it do the walking grazing pretty much all the time unless it hears a noise then it runs away. It makes the whole thing a lot simpler and less buggy. I think all the exec pins being connected and all the loops make animations overlap. I made the hunger stronger so it would eat more and it was eating in the middle of the sleeping animation looping. I realized everything needs to be sorted into one line instead of lots of lines firing simultaneously so I'm stripping it all down. So far I got it to graze all the time and run away if it hears a noise. Now I need to see how to make it run away from me rather than towards me.. I really don't like random point. I see how this is all logic based and it's like I'm programming the animals brain. I should give it a purpose..
Hey man, I have used a few of your tutorials now they are really useful. Is there a way to implement AI running from other AI into this code? thanks in any case keep up the good work :D
Thanks a lto for the very helpfull video. If I want a whale to simply move/dive down a certain distance when the player comes too close, what would I have to change?
Ok at 2:00 you cast to player, what if i have to cast to another actor, like a fire, how can i face the "object" wildcard? It will always fail since i can't get player character out of it, and get actor of class didn't work since it will be spawned later and it isn't on the already on the scene. There really isn't a "wildcard" for this cases? I tried the "look the blueprint class on the upper right corner and make a reference of it" but never worked. Still casting it's the most obscure node out of the main character actor.
Thank you for the video and explanations. Hopefully this mechanic will make my project fun. I have a question if anyone can help. Can we set coordinates to where the AI wants to run to? Yes, run from the player randomly like this, but with an ultimate goal? (AI wants to run away to a friendly area)?
Instead of triggering on Event BeginPlay which doesn't make too much sense as the AI will run away from you even if it hasn't spotted you yet, what node would you use to only trigger it when you are within focus range?
Hey Matt my Ai is always running into a wall and then getting stuck there until I get in front of it. How would I make it so the Ai is sensing all around itself instead of just in front of itself? Thanks again for another excellent tutorial
@@primitivepatterns i.imgur.com/IC2kGuP.jpg The part at 7:02 where he connects the ON FAIL back to his run away function is where it breaks. Because the ai is trying to run a certain distance from the player there is no where else to go when he reaches a wall. The pic I sent adds a small ai move to on the failed pin that basically keeps the ai running somewhere until the player gets in a position around him so he can run down the side of the wall and away. It actually looks pretty good almost like a squirrel running back and forth not knowing where to go and then when you walk up and in a position he can run he will take off again. I guess a better way might be to have target points the ai can run to when he fails and then go back to your run away function, but this at least keeps it from getting stuck. If you have any questions let me know?
hey for some weird reason none of this works at all for me, I have double checked that I have the exact same blueprint as you but the ai simply stands still. do you know if there is anything that could be preventing it? thanks
Hi Matt I'm new to your channel so IDK if you do request but if you do I have one. How do you make a working computer kinda like this th-cam.com/video/I1jv7E77XPM/w-d-xo.html. And Also thank you for all of your tutorials they have helped me a lot.
Does anyone know how i could make it so that there's a radius around the AI? so it will start running away when you enter that circle around it? I want the AI to constantly move around the world, but it will start running away even when i dont see it.
4:06 Anybody using this for a UE5 project, use the * to find Multiply and select it. The bottom pin will be Yellow by default. Right click on the bottom pin and go down to Convert Pin, then click Float. There are 2 options (single and double precision) to choose from, but I used the single-precision float. As always, thanks for the upload, Matt...you condensed what others try to explain in an hour down to a 9 minute video that is easy to follow 🤘😎🤘
Thanks for this!
Thanks a lot! I have found the multiply for 15min, finally i find your comments to solve my problem
Thahkz men, matt nice video like
Huge thanks for this
thanks
For anyone making a 2.5D sidescroller: I had an issue with the AI only moving away when the player is on one side of the AI and wouldn't do anything when the player is on the other side. To fix this, if anyone has this issue, instead of putting GetActorLocation of the enemy into the Add node I put GetActorLocation of the player into the Add node and that fixed it. That simple. Obviously having to mess with what axes I used in the Break and Make Vectors as well. Just for anyone's reference.
Otherwise, this tutorial was great! Simple, clear, and easy to understand. I love that you just speed through these and explain things as you go. Trusting our intelligence and ability to pause and rewind the video. No unnecessary droning on. Great job!
My work around was making a scene in the actor blueprint, make them face player, change rotation180° and ai move to the scene location with a event by time it wasn’t pretty lol
Awesome video, thanks for making this and so many others Matt! :)
I have LITERALLY been trying to find out how to do this!
Oh perfect! Hope it helped :)
Pls everyone support Matt .He's a real hero
you right
Great tutorials dude! Been looking for this solution for the rabbits and deer's in my game I'm working on!
Thanks bro! 😊
Awesome to hear man! Thanks for the support!
worked well, thanks!. I modified it a little to work within a behavior tree.
Damn! I actually found out how to do this on my own!
Okay at 4:28 I used random vectors and just set the values in the negative.
Thank you so much! Was able to frankenstein this into my AI to get it running from me!
I'm currently working on your deer tutorial but wanted to make some modifications so I'm breaking the whole thing and figuring out how it all works so I can make it do things I want. I'm getting the hang of it. Completely got rid of the whole hunger system and just made it do the walking grazing pretty much all the time unless it hears a noise then it runs away. It makes the whole thing a lot simpler and less buggy. I think all the exec pins being connected and all the loops make animations overlap. I made the hunger stronger so it would eat more and it was eating in the middle of the sleeping animation looping. I realized everything needs to be sorted into one line instead of lots of lines firing simultaneously so I'm stripping it all down. So far I got it to graze all the time and run away if it hears a noise. Now I need to see how to make it run away from me rather than towards me.. I really don't like random point. I see how this is all logic based and it's like I'm programming the animals brain. I should give it a purpose..
he is the best teacher for learning unreal 4
Thank you so much!
Love it, Matt, thank you!!
i love u so mush thanks to this video n you!
The trouble that I had been up all night was solved at once was solved. It's the best!!!!
I can make Catcher in the Rye now.
Thank you and have a great day.
Thank you so much for sharing this!!
Very well explained, thanks!
Thank you very much very well explained👍👍👍
You are a legend:)
Thanks! Great job
Hey man, I have used a few of your tutorials now they are really useful. Is there a way to implement AI running from other AI into this code? thanks in any case keep up the good work :D
Forgot I had to add a Nav Mesh Bounds Volume to this to make the character run away.
Yeah it's very easy to forget, I should've mentioned it
OMG thank you! I was wondering what I did wrong haha
Hello, I have a question, if i stuck the AI in the corner how can i fix it ? Please help me!!
Thanks a lto for the very helpfull video. If I want a whale to simply move/dive down a certain distance when the player comes too close, what would I have to change?
Ok at 2:00 you cast to player, what if i have to cast to another actor, like a fire, how can i face the "object" wildcard? It will always fail since i can't get player character out of it, and get actor of class didn't work since it will be spawned later and it isn't on the already on the scene.
There really isn't a "wildcard" for this cases? I tried the "look the blueprint class on the upper right corner and make a reference of it" but never worked.
Still casting it's the most obscure node out of the main character actor.
Nice video
Thanks man!
Thank you for the video and explanations. Hopefully this mechanic will make my project fun. I have a question if anyone can help.
Can we set coordinates to where the AI wants to run to?
Yes, run from the player randomly like this, but with an ultimate goal? (AI wants to run away to a friendly area)?
Instead of triggering on Event BeginPlay which doesn't make too much sense as the AI will run away from you even if it hasn't spotted you yet, what node would you use to only trigger it when you are within focus range?
do a sphere collision, and when the player overlaps that collision it will trigger that event.
Remember to add a Nav Mesh Bounds Volume to your level in order for this to work
Hey Matt my Ai is always running into a wall and then getting stuck there until I get in front of it. How would I make it so the Ai is sensing all around itself instead of just in front of itself? Thanks again for another excellent tutorial
Mine is doing the exact same thing. Did you ever figure out how to avoid it?
@@taylorhead9842 sadly I did not :(
@@primitivepatterns If I eventually come up with something I'll post here
@@taylorhead9842 thank you! Looking forward to seeing your solution
@@primitivepatterns i.imgur.com/IC2kGuP.jpg The part at 7:02 where he connects the ON FAIL back to his run away function is where it breaks. Because the ai is trying to run a certain distance from the player there is no where else to go when he reaches a wall. The pic I sent adds a small ai move to on the failed pin that basically keeps the ai running somewhere until the player gets in a position around him so he can run down the side of the wall and away. It actually looks pretty good almost like a squirrel running back and forth not knowing where to go and then when you walk up and in a position he can run he will take off again. I guess a better way might be to have target points the ai can run to when he fails and then go back to your run away function, but this at least keeps it from getting stuck. If you have any questions let me know?
thanks! this'll be useful especially in civilian AI when shot at
Great implementation idea!
please make series of third person shooting game
Reminds me of GTA Vs muggings haha
Haha yeah that's very true lmao
That or diablos treasure goblins! Another useful tutorial, thanks Matt!
hey im not able to reference self in my ai move to... what do i do?
hey for some weird reason none of this works at all for me, I have double checked that I have the exact same blueprint as you but the ai simply stands still. do you know if there is anything that could be preventing it? thanks
just an update, It was fixed and was a silly mistake i made, i forgot to set the nav mesh bounds
Mmm... smells like *Hello Guest AI*
It gets tuck when cornered
Does anyone know how to do cover system with splines?
This tutorial works, but only until the npc runs into a wall. :(
Hi you forget to make a video on ai attack on player
Mine just wont move for some reason!
how do i make it work in multiplayer?
I'm gonna make Ants running away from the Player😂😂😂
(2 Edits deleted)
Edit 3: is it somehow possible to make the AI only run away if you get near it?
Use branch and trigger volumes
Hi Matt I'm new to your channel so IDK if you do request but if you do I have one. How do you make a working computer kinda like this th-cam.com/video/I1jv7E77XPM/w-d-xo.html. And Also thank you for all of your tutorials they have helped me a lot.
Perfect for another hide and seek android trash crap game
Does anyone know how i could make it so that there's a radius around the AI? so it will start running away when you enter that circle around it?
I want the AI to constantly move around the world, but it will start running away even when i dont see it.
Just lower the number from 500 to something lower and it should work