Legend has it that the dummy A.I. is still running to random locations to this day.
@gargrumel2 жыл бұрын
Thank you, this has been very informative and so easy to follow.
@argmon9090 Жыл бұрын
😭
@merronmist23685 жыл бұрын
hope this series continues for a good while. Thought I'd pose my scenario here: My ai is a child of my main player character. I have 4 ai in the scene, all of which run randomly as expected. :) But when they view one another, canseeplayer will be turned true. To avoid this, I simply do a "isplayercontrolled" check/branch before moving to set the canseeplayer bool to equal successfullysensed.
@Sarcantuna5 жыл бұрын
I have been trying to get Behavior Trees to work for months, this is the first series that I've been able to follow! Thank you!
@lowpolyambitions58536 жыл бұрын
Your Videos are like a TV show. Kills me when an episode ends and I can't wait for the next ;) Nice Job! Keep em comin'
@commoncure33352 жыл бұрын
i'm not even a game dev i just like to look at the node graphs
@valiant70573 жыл бұрын
Thanks for keeping the videos short and succinct. No fluff or setting up adjacencies that aren't core to the mechanic being taught
@memmytv26372 жыл бұрын
This series is literally saving my life in my course on Unreal Engine rn lmao
@StewRatDev4 жыл бұрын
Hey, as a heads up if you went though this and your AI refuses to move/moves to the player once then nothing, check the node connected to root. It should be a SELECTOR, if it is a SEQUENCE you will get this bizarre behavior. This is because a selector stops when it hits a success, and a sequence stops if it hits a fail.
@kilbyfilms81325 жыл бұрын
one of the greatest UE4 tutorials i've EVER seen.
@RyanLaley5 жыл бұрын
Thanks Kilby that means a lot!
@kilbyfilms81325 жыл бұрын
@@RyanLaley wow thanks! but i ran into a problem on part 3. when i just open the NPC in the ai folder to get to the graph editor, it just says "unrecognized tab" do you know how to fix that? or did i just mess up? i looked at the comments to see if anyone else had that problem, and i think i was the only one who did. if you could help me out or give me a tip, that would be great. i did just start yesterday though, so it's most likely on me. thanks. :)
@RyanLaley5 жыл бұрын
(going from memory here so could be inaccurate) Up top is the windows menu option. Click on that and you should see something like reset tabs/windows or something. That will reset the windows to default settings. That may fix it
@kilbyfilms81325 жыл бұрын
@@RyanLaley thanks :D it worked! btw, while i was waiting for a response, i was just running around in what i had so far from your tutorials (i had fun) XD. thanks
@luckyducky78195 жыл бұрын
Thanks again for telling me about this series on reddit. I understand more of how to do dynamic AI, and I've subbed and rung the bell to wait for more episodes!
@RyanLaley5 жыл бұрын
Thanks glad I could help. More coming every Thursday :)
@DRAWKCABLLA3 жыл бұрын
@@RyanLaley unreal keeps fucking changing shit. 2:45 doesnt work
@JamesGorman3 жыл бұрын
@@DRAWKCABLLA Hope you got this sorted but after I double checked everything then switched to 'Get Player Pawn' instead and it worked for me.
@robertdavies51392 жыл бұрын
Thanks Ryan. Very clear delivery. I was using pawn sensing based on sight and that was working well but doesn't give me the flexibility I wanted. Behaviour trees seem to be the way to go so, thanks to your videos, I'm happily building out my enemy BT's :)
@raziela69043 жыл бұрын
2:19 Have my AI set to walk to an object instead of to a player, tried using the "GetActorLocation" and had an object reference in place. Kept getting errors and whatnot, so just wondering how to get it to walk to the instance of the object it saw. Cheers
@joshc38025 жыл бұрын
Very well made shows, thanks for the content it helps those of us that are strictly visual hands on learners.
@kvtys4 жыл бұрын
this vid series is honestly a life saver, thank you
@YoutubeAccountMan2 жыл бұрын
How would the task at 2:30 change if there are multiple players?
@wayatvideos21423 жыл бұрын
You're good at getting to the point my friend, excellent
@brianmartin41785 жыл бұрын
I'm replicating this in C++ (I know, I'm mad but can't stand Blueprints). It didn't work - the AI wasn't following me even when it saw me because I'd not set "Observer Aborts" to "Both" on the decorators in the behaviour tree so the selector wasn't switching to the "Chase Player" sequence node. Maybe I missed it but can't see this being done in the video so this might be another difference between C++ and Blueprints (trust me, there's lots of differences). Anyway, good video that shows just how sophisticated the perception system and AI system in UE4 is.
@blinkrogue13445 жыл бұрын
im very new to all this c++ and blueprint stuff, but if im correct, blueprint is good for kinda prototyping a system, then refine the system with c++. But how is the behaviour tree? is that good enough to a point where i can only code my AI with the behaviour tree?
@madridfan9946 Жыл бұрын
Is there a way to get the NPC to see an object (ball, etc) and move towards that when saw rather than the Playable Character?
@FF-FAN99993 жыл бұрын
seems like on 4.27 the on target perception info updated node doesnt have the actor output anymore. any clue on how to fix this?
@theawesomegoldfish95674 жыл бұрын
I have a strange problem, not sure if it's a misstep on my part but at 8:18 when you select the senses config, I click on "AI Sight config" and it remains at "none" the weirder part is that I have the option to compile as if I changed something, yet I'm not able to add the sense and the drop down for it never appears. Any help would be appreciated thank you!
@leegami32343 жыл бұрын
Same problem...
@leegami32343 жыл бұрын
If you still having this problem, try removing the AIPerception component and create another one, and DON'T change its original name. Strangely it works for me...
@Eric_Malbos5 жыл бұрын
Works very well, thanks for this tutorial. The decorator Can't see Player is not compulsory, it will work as well even if there is just the decorator See Player.
@migueldomingos45705 жыл бұрын
At 7:27 you say that sequences execute all of them regardless ifthey fail or not, but they stop executing if one of them fails, right?
@benjaminsiegel38654 жыл бұрын
If you want to make it easier to see if he's going to chase you or not, increase his peripheral vision (which he shows at 8:35) to the max
@nklz70054 жыл бұрын
At 3:02 , should I higher the radius if I have a bigger map?
@RyanLaley4 жыл бұрын
All depend on how far you want your AI to sense the player
@nklz70054 жыл бұрын
Yeah I tried a a pretty high value but then he just randomly roamed around instead
@SevenYearsGoodLuck4 жыл бұрын
I can't believe I am making a game. Thank you for enabling my dream game to come true. I am glad I subscribed.
@sebastiendns10744 жыл бұрын
I've been following your tutorials for a couple of weeks, it's great learning with you. Thx a lot. I added variables to my NPC and i want to transfer them to SightRadius and PeripheralVisionHalfAngleDegrees. I added a visual vision Cone to my NPC like in Desperados 3 (simpler though, for the moment) and want the detection to match it. i can't figure out how to cast the stimulus to AISense_Sight to set the value... Is this the wrong way to do it ?
@DRAWKCABLLA4 жыл бұрын
same issue FUCK EPIC GAMES FOR CHANGING THE ENGINE
@lokergames70582 жыл бұрын
Thank all work one question two people talking?
@DannyshRosli2 жыл бұрын
Okay hey everyone , for the one that have issue where player doesnt chase you. First you need to debug whats the issue. Unconnect Random Location from behaviour tree. And just focus on chase player first. You need to be in debug mode so that you can see if the player is actually seeing you. If it the doesnt, it is likely is your pawn. My silly mistake was , i did not have a game mode in my map. So the AI cant really tell whos the pawn, even having a AI Perception Stimuli also it doesnt sense my Character. Hence fixing the AI cant see you. After having a gamemode, it can now SENSE you. Dont forget to change your pawn in gamemode options to your Player Character. Now if the AI sees you, but instead of running towards you, it runs away from you everytime it can see you. It is because, in your FindPlayerLocation task,you may have to remove Navigable Radius node, and just slot in Actor Location to the Value. Now it make more sense, instead of everytime the AI sees you, it literally runs to your location, ratther than run towards RandomDirection. Hope i make sense.
@jasonelliott729 Жыл бұрын
Thanks! Mine wasn't working until I unplugged the random location. Thanks for saving me a lot of time because I'm new to Unreal.
@adeptguy1634 Жыл бұрын
Hi Ryan , i need some help ony my project, i need the player to get closer to charcter, and then he punches him if character moves he should move towards him, do you have any idea or can make a video on this, would be helpful,
@TheRedflash7773 жыл бұрын
What I've noticed, you don't have to mandatory add stimuli source to player character, AI sees him in any case.
@manideepadithya11204 жыл бұрын
THIS IS THE BEST SERIES...THANK YOU VERY MUCH
@zigglyDev3 жыл бұрын
If you did everything and your Ai is not working then change "move to" to "directly move to". It worked for me.
@Jackinyourbox2 жыл бұрын
This doesnt work on my version, the NPC will rotate on the spot, but does not physically move at all. I rotated the mesh as other users suggested, deleted the nav mesh and the recast nav mesh then created a new nav mesh which generates a new recast mesh. Still nothing. I even deleted my project and restarted it from scratch with the same result. Any thoughts?
@alexpotts6194 жыл бұрын
Hey, I don't know if you still lurk on these older videos but I'm having a problem with the Cansee bool. The AI can perceive me but doesn't switch the bool despite that, using debug mode shows that i am visible but the Cansee bool doesn't switch Any Ideas?
@pagoda_dimensionale97614 жыл бұрын
same
@megtwin4 жыл бұрын
same here, did you fix it?
@alexpotts6194 жыл бұрын
@@megtwin Yes my problem was based around two things, firstly It needed to be within the controller class and secondly it needed to be cast to the third person character, hope this helps
@megtwin4 жыл бұрын
@@alexpotts619 Its working after watching the beginning of the next video, lol! Thanks for responding.
@JoffreyRs3 жыл бұрын
@@alexpotts619 Hi, When you say it has to be within the controller class what do you mean? Could you elaborate more?
@Duckamoly4 жыл бұрын
I watch all your videos for a while but use them when i need them. It was working until I added the decorators and now it only does the random move to once? Please help if u do much appreciated. (sorry i set the wrong key *facepalm*)
@megtwin4 жыл бұрын
This is great, as I follow, I'm separating them between Animals and Humans. Thanks for providing these tutorials!
@gamerdweebentertainment16163 жыл бұрын
You can use behaviour tree in player character, yes?
@felicebagnulo36184 жыл бұрын
Hi, I noticed that between the first video and the second, it is not shown in the creation of the SelfActor variable on the blackboard, by chance it is not used or is it necessary?
@megtwin3 жыл бұрын
@Thefan Go into your char BP and turn him 90 degrees to face forward
@aidanbobhog63033 жыл бұрын
2:19 I have a question, so Instead of an npc chasing a player, I want it to chase another npc. Infact, I want it to be every npc for themselves. And everything else I got to work except for what you place right here. I can't find the NPC alternative to this "get player location" node. What should I do?
@typicalretard69683 жыл бұрын
maybe cast it to the npc class and get the actor location from there?
@bazinga79944 жыл бұрын
Great tutorial mate. Got a Sub from me. But i got one problem. The ai does follow the UE Mannequin Blueprint , but not my selfmade Charater Blueprint. Any suggestions?
@tylerbaker28734 жыл бұрын
I need this answer as well using a fpc from the horror engine set it up the way I would for the first person character but not a damn tging
@craigbrown58794 жыл бұрын
Hi, I've followed this tutorial series and absolutely love it however I seem to have an issue where the AI can see the player once they enter a nav mesh. Even if the sight radius is small they can still see exactly where the person is and I just have no idea what the solution could be. Any help would be fantastic!
@FreakSheepVODS3 жыл бұрын
Change the PeriphalVisionHalfAngleDegree on in the AiPerception in the AI controller from 90 to a normal eye sight of 45 this shut help with youre problem 90 means he hase a 90deg angle on sight
@PiterTraceurFA2 жыл бұрын
God damn those behaviour trees, but I think I'm finally getting the hang of it
@tylerbaker28734 жыл бұрын
Having a hard time getting the ai to follow me I’m not using the mannequin I’m using my own character which I gave stimuli and changed the cast to to the character I’m using I followed the video to the t but there is a mix up when not using mannequin. It keeps saying there’s is an issue with ai controller setting the value of the bool
@JoffreyRs3 жыл бұрын
Hey, did you end up figuring out the solution for this?
@tylerbaker28733 жыл бұрын
@@JoffreyRs no I haven’t unfortunately
@magdalenaszulecka79694 жыл бұрын
hey my enemy doest chase me I checked if the success box is ticked , is the radius is 100, that I used "vector" get and nothing happening any idea?
@JoffreyRs3 жыл бұрын
Hey, did you figure out a solution for this?
@magdalenaszulecka79693 жыл бұрын
@@JoffreyRs I don't remember how but he did in the end or I found an clue how to fix that in next video part
@jyashi14 жыл бұрын
If any of you are having the problem where the AI just stands there watching you but does not RUN towards you / follow you, then make sure that the Vector blackboard key variable is public and also that in Decision tree the Vector is set to TargetLocation. That did it for me.
@CrazyRabbit02283 жыл бұрын
Also don't forget to set the Finish execute to true
@Kunaj_83 жыл бұрын
A quick question. I've already made an AI system for a follower npc and an enemy npc. The follower npc can roam freely, stop movement or follow the player by command. The enemy chases the player when the player is in range. All the code is done inside the character blueprints. Should I just scrap all the code I have made already and use this method instead? This seems way more complex. Will this be more efficient method in the end?
@bagsy48845 жыл бұрын
Amazing as always
@Shumaro-dy5xn4 жыл бұрын
I want to create a Stealth game, so the idea is that you can hide in a shadow (bp actor), how can I disable the pawn sensing?, you make a cast to the player, so you shouldn't just disable the AIPerceptionStimuliSource
@AT-jg2jj4 жыл бұрын
Hi, did everything like you said, but it seems the NPC can't perceive the player, I can't see AI debug while ingame (as I don't know where the apostrophe key is on an azerty keyboard, tried the # key on left (like to show console in a game) but it does not work. Anyway, while in game, if I look at the beehavior tree, it seems that the NPC can't see the player, it refuses to engage the "Chase Player" sequence. Tried three times already, i'm on UE 4.22, is your method still up to date ? The AI stiluli is correctly set too on my main character so I have no idea why it does not work. I made a test by disconnecting the random location sequence and the NPC goes to a certain point and then not move anymore. Also, during this test if I get in front of the NPC it turns immediatly and continue his road to another unknow point. Very strange EDIT : I've succeded to change the key for the debug AI, so now what I can see is that when I'm in front of the NPC, the CanSeePlayer becomes true but for some reason the chase sequence does not engage still, the NPC continues on the Find Random Loc sequence
@IvanSorce4 жыл бұрын
did you find a solution?
@WolframSaga4 жыл бұрын
@@IvanSorce GetPlayerPawn worked for me instead of GetPlayerController in the FindPlayerLocation BP.
@Levelworm5 жыл бұрын
Thanks for the tutorial. At 11:20 it seems that I do not have the Cast to Third/FirstPersonCharacter options, do you know what could be problem? Thanks in advance.
@RyanLaley5 жыл бұрын
It will be "cast to (whatever your character actor is called)"
@poshy2215 жыл бұрын
Sorry for a dumb question. I made a NPC for my enemies, now when I cast to do I cast to the NPC or do I cast to My character?
@megtwin4 жыл бұрын
@@poshy221 Cast to your Player Character
@Struggles_yt4 жыл бұрын
hey could this be packaged up and used modular throughout different projects or would i have to kind of change things around or reset values? obviously i would need to create a navmesh but just wondering if its plug and play, watched all videos thank you man
@okanerenli4 жыл бұрын
I'm always been in to blackboard stuff. Problem is I'm using this and more complicated techniques in Parent AI Class. What is the benefits of this. I read Blackboard is good at for multiple AI management, more like a commander. Is still feels like making a function library for AI and trigger event command system is looks easier for me.
@deltaghostprofessionalgame8752 жыл бұрын
where do you set " bSeePlayer" to false, so it stops following you ?
@jamescreed40653 жыл бұрын
So essentially a Decorator is like a Branch?
@lewaplay2 жыл бұрын
WTF IS FundPlayerLocation? In which video do you wrote it?
@chinuonchaitanya83404 жыл бұрын
Is there a way to cast to multiple character..isntead of third person character...i have a character selection screen ....so i have multiple character blueprints classes
@vegitoblue21875 жыл бұрын
12:01 wont it be cleaner to do with a service on blackboard?
@marlowes34134 жыл бұрын
oof I think I did something wrong because it isn't working. Now my ai won't move at all.
@clebo994 жыл бұрын
Do you have a video that goes over how you would do more specific kinds of movement actions? For example, I want to be able to say have my player walk to a location on the map and at that point, an NPC will walk over to my character (think of it like a waiter coming over to a table where the people just sat down). Do you have a video for that or could you do something like that? And I don't mean necessarily a cinematic/cutscene. This would be in-game. Really love the videos. Great stuff as always.
@aaronh2484 жыл бұрын
That sounds like a basic trigger activated event. So put down like a box trigger ( box collision ) that will reference the NPC, and look for the player to walk into it, and then activate the A.I of that NPC through the reference. That is my guess and sounds about right. I'm still fairly new to all this
@conorlowe55144 жыл бұрын
Hi, really enjoy the videos, they're incredibly useful. I seem to be having an issue however when I try to recreate this for my 1st person game. The AI run around randomly but don't seem to be able to see or follow the player.
@fragelius2 жыл бұрын
problem is probably that you are casting to third person character in your case you need to cast into first person character... I had same problem but I have top down character :)
@maui-studios4 жыл бұрын
Hey bud, are you able to swap out a Player Character for VR eg HMD or VR Motion Controller Pawn? So that the NPC AI is chasing the VR user?
@mahad-34435 жыл бұрын
I followed this Guide step by step, but my AI is dont chasing me. I think it has to do with the fact that I already have a larger map, but i dont get it can someone give me a advice?
@JDKDKDLDKDKDKDKKKDERYY4 жыл бұрын
have you expanded the object which is saying the AI where it can go? Anyway, one year... i dont think you'll need any advice anymore, do you?
@bryeazy16393 жыл бұрын
Hello I am following you amazing tutorial but I'm running into a problem I'm on version 4.26 and when I get to the part where we (Cast to Thirdpersoncharacter) I am getting something totally different can you help me I really want to make my AI work. I am stuck at the 11:22 time mark in the Video
@jimaki_373 жыл бұрын
Hey, I'm also looking at the project on 4.26.1 as of speaking but I can confirm that I can bring up the block just as shown in the video. The only thing I can say is that the "ThirdPersonCharacter" blueprint is as named at the 3rd person template. Maybe you named him differently and didn't realize it. Other, than that, I hope that you can find the solution to your problem :D.
@bryeazy16393 жыл бұрын
@@jimaki_37 Nope I didnt rename anything the Cast To ThirdPersonCharacter option is not there instead there are only 2 selection that read CastToThirdPersonGameMode and CastToThirdPersonGameMode Class
@bryeazy16393 жыл бұрын
Fixed It
@XMan-lp9bb5 жыл бұрын
Is anyone got this massage ? Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue". Blueprint: FindPlayerLocation Function: Execute Ubergraph Find Player Location Graph: EventGraph Node: Set Blackboard Value as Vector
@dmitriypotapoff71154 жыл бұрын
As mentioned in other comment, if you use MotionControllerPawn (VR), just use Get Player Pawn instead of GetPlayerCharacter
@vegitoblue21873 жыл бұрын
you do not need to add a stimuli source as all pawns are registered as stimuli source by default
@2hawks1255 жыл бұрын
Hi Ryan, Great vids. How does one make the AI Character chase and-or interact with another instance of the AI Character? If, for example, I place 2 copies of the NPC_AI character into the world I can get them to perceive each other by adding AIPerception and AIPerceptionStimuliSource to the NPC_AI file. But when it comes to chasing (finding the location to move to of the other AI) I am unable to figure out how to do that. GetPlayerCharacter seems to just get the location of the human controlled player. Anyone point me in the right direction?
@RyanLaley5 жыл бұрын
You want to get a reference to the instance you wish it to chase (could be nearest one eg.) Then with that reference saved as a variable (called target or something) this can then be fed to the blackboard and stored there
@2hawks1255 жыл бұрын
@@RyanLaley Thanks Ryan! I know this is noob-ish of me, but how do I get a reference to the instance. In this video, when following player with the ChasePlayer event graph, we use Get Player Character -> GetActorLocation (etc). I really have looked all over the place to see if I could find this listed somewhere but it seems to be hiding from me. All that said, you are making great vids and I hope you make them for a long time to come.
@RyanLaley5 жыл бұрын
Thanks man. It's not a noonish question at all. There are many ways to get a reference. For example Get all actors of class and choose one randomly, or sort them into nearest first. Either way, you will get one out of the array and then you promote that to a variable
@GaryParkin4 жыл бұрын
It would be interesting if there was more then one npc and they could work together. I may try this after learning more. Thank you.
@shubhamlal81882 жыл бұрын
Well U can just create NPCs and in Class Defaults section just chuck in the NPC_AI in AI Controller Class....😊
@Moodydata4 жыл бұрын
Hi Ryan, just wondering is it possible to do something like "Can see player" for pawn sensing? I just feel more comfortable using that.
@Need2pee4 жыл бұрын
Hey , maybe you could do that as well only that should be done in your enemy class I don't think you can do that in your AI controller rest all should be the same (try it out and let me know if it works) 👍🏻
@skilatgamedev33535 жыл бұрын
Heloo there, I'm sure that you know more than me but I was just wondering why it was better to use the "Ai perception" rather than the "PawnSensing" that looks more simple to use eventually. I have also made an "ai move to" to follow me to "success" but I find it unfortunate that the enemy does not follow me at the moment when he sees me but when he has finish the execute only
@MatterOfFire Жыл бұрын
It's probably going to be a late answer, but still: pawnsensing is sort of a legacy at this point, and unreal devs suggest using ai perception, as it is more effective resource-wise at doing the same tasks
@BridgesProductions20243 жыл бұрын
Do I need the SelfActor?
@RevolutionaryWillRegan4 жыл бұрын
I am having trouble changing from default 3rd person character and getting the NPC to still recognize my character. Is there anything I must do other than add a stimulus perception, add the drop down sight into its array, and check the auto register as source at start box?
@RevolutionaryWillRegan4 жыл бұрын
Ok, figured this out. If anyone gets stumped on this - look in your NPC AI graph and find the flow chart element that says "cast to 3rd person character, " delete it and replace with a new element called "cast to " Mine was a paragon character class - predefined. It worked.
@cyrillecontamine31574 жыл бұрын
Hi! Around 7:30 you are saying that tasks in a sequence will be executed regardless of the failure of one of the tasks but the UE documentation says otherwise, if a task in a sequence fails it won’t execute next tasks in the sequence : docs.unrealengine.com/en-US/Engine/ArtificialIntelligence/BehaviorTrees/BehaviorTreeQuickStart/index.html
@RyanLaley4 жыл бұрын
Yes apologies that is incorrect. What I meant was that the tasks will only play when the previous task in the sequence was successful. Where as a selector will not play any sibling tasks unless the previous one failed.
@cyrillecontamine31574 жыл бұрын
Ryan Laley thanks for the reply ! Also many thanks for the really great tutorial series, I’m enjoying every bit of it ;)
@Drewppp3 жыл бұрын
Any idea why my NPC runs forward but is looking 45 degrees to the right? I turned off Yaw and tried both Use Controller Desired Rotation and Orient Rotation to Movement and he still runs straight but does not look the way he is running...
@defiant4eva3 жыл бұрын
Your NPC mesh is set at the wrong facing angle. Go into your NPC Character>Viewport>Mesh (characterMesh0) (Inheretred) and rotate it 90degrees in the view you need. Compile and run the game to see if it is correct, rotate again if it isn't or until you get the right forward direction
@megtwin4 жыл бұрын
To everyone who has had issues and expects the AI to follow you , he won't, this video just makes it move to the last location where you were. Do the next video in this series.
@ATP2555ify4 жыл бұрын
My guy is not following. I did everything you did and he still runs around. He sometimes turns to look at me when I run up in his face but goes back to running around.
@megtwin4 жыл бұрын
Same here, I'm using v23, what version are you using and did you fix it?
@NunWithaSpudSpun4 жыл бұрын
If he looks at you, you most likely have an error with acceptance radius or target radius. So the AI will turn to you, but think he's already at you and achieved his goal
@Xavid-yj3hk4 жыл бұрын
@@NunWithaSpudSpun how can i fix this?
@GaryParkin4 жыл бұрын
@@Xavid-yj3hk Did you remember to Check the Success box on the Finish Execute in the FindPlayerLocation BP? That's what my issue was.
@beastmodejelly86544 жыл бұрын
the first time that i tried i had the same problem,now i re-did the process and made sure to drag Vector as (get) not as (set) "i think that this is how i messed it up the first time",second..i made sure to save in both "behavior tree" and in "blackboard",and compiled all the time,now the AI is chasing me like an animal lol
@Leegf5 жыл бұрын
There's no need add ai stimuli source to player, ai perception automatically perceps pawns
@RyanLaley5 жыл бұрын
Funnily I noticed this two nights ago :)
@jcapo18032 жыл бұрын
I'm having an issue with animations not working. My AI just slides in the idle animation when walking around
@nasaeyong2 жыл бұрын
I have just encountered the same thing and spent a couple hours debug it, if your are using Unreal default animation blueprint try to disconnect the logic that checks for character acceleration in the event graph. For some reason the AI move to doesn't seem to add acceleration to the character hence the "Should Move" variable is never set to true in the ABP.
@jcapo18032 жыл бұрын
@@nasaeyong thanks, I have since figured things out, but still appreciate the response. My issue was that I was using a Paragon asset, and what you said was right. It would only detect input by a player controller so I just had to swap a node or two. :)
@LikeAZombie014 жыл бұрын
One issue i have is that when i crouch, the NPC also crouches which i don't want.
@pumancz4 жыл бұрын
Hi, I have an issue. when the character sees me, it just stands on the place.
@itsmorlok4 жыл бұрын
Make sure to set success on the finish execute node to true inside all of the tasks.
@StewRatDev4 жыл бұрын
also make sure you have a selector node on root, i had a sequence and it was causing a similar issue.
@vegitoblue21874 жыл бұрын
I'm tring to make a visual of the line of sight for the characters which i could change procedurally to make it easier for the player to avoid them. Any ideas how I could do this??
@NathanRech4 жыл бұрын
when did you create the "SelfActor" key in the BlackBoard?
@RyanLaley4 жыл бұрын
Depending on which version of ue4 you are using, this is added automatically. O think it doesn't do this anymore
@XMan-lp9bb5 жыл бұрын
I tried GetPlayerCharacter many times . but Runtime Error Massage "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue" always . So Version4.23 is not support it
@sandy12343785 жыл бұрын
Why is the AI character getting repelled by my TP character? The moment it looks at me, it turns sideways to face another direction and runs to a random location in that direction. EVERYTIME.
@jey84465 жыл бұрын
you didn t explain the SetActor key and how we do that
@RyanLaley5 жыл бұрын
Where abouts in the video are you referring to?
@jey84465 жыл бұрын
@@RyanLaley 1:01
@jey84465 жыл бұрын
keys
@jey84465 жыл бұрын
@@RyanLaley because i think it s the thing i d ont have and thx for the answer😉
@RyanLaley5 жыл бұрын
That says 'SelfActor' and it is there by default by the behaviour tree. It is simply a reference to the actor this tree is running on.
@jameskoss5 жыл бұрын
It seems like a bad idea to reference the key by a static name. Isn't there some way to get the key name by reference from the blackboard? (Set Value as Bool -> Make Literal Name)
@HammerSlammers2 жыл бұрын
thanks for the videos somehow it still works even on UE5
@GrounddevLF4 жыл бұрын
so i had this working but when i went back to the project the tree wont fire anymore anyone have any ideas?
@MARCOAURELI05 жыл бұрын
Hi, when the character gets a new random point before start his movement he rotate quickly in the direction of the new point .How can i get a smoothing rotation of character?
@RyanLaley5 жыл бұрын
In the character movement component there is a setting for rotation rate. Turn it down.
@mattrossi18983 жыл бұрын
I'm having an issue where the enemy is patrolling around and as soon as he sees the player he turns towards the player and stops and doesn't move at all after that. I am using the first person character instead of a third person character, so I put a 'cast to first person character' node instead of third person character. not sure how the AI perception stuff works.
@PsyCoCinematics3 жыл бұрын
If you didn't fix it yet, try putting a breakpoint on the tree bits and see what they turn up. I had an issue tinkering with settings and seeing how they changed stuff yesterday and it turned out one of the things I was tryin' to make it do it didn't like and I only found out because of the breakpoint pausing time and letting me hover on it to see "invalid location". Tweaked that task a bit and now it works fine, hopefully you'll have the same results!
@mattrossi18983 жыл бұрын
@@PsyCoCinematics thanks, that helped
@PsyCoCinematics3 жыл бұрын
@@mattrossi1898 Sweet!
@mattrossi18983 жыл бұрын
@@PsyCoCinematics I noticed IsInvestigating is set to true when the player is spotted and doesn't go away unless they go back to patrolling, so every time the AI enters the investigate gate, it is playing that sound. Im not sure how to remedy this situation for some reason. I have been staring at this for days.
@charleslozano5975 жыл бұрын
Hi Ryan quick question is it possible to change the Max Walk Speed from the Enemy from the behaviour tree? Im trying to make so that once the enemy detects the player his movement speed increases. Thanks
@RyanLaley5 жыл бұрын
Yep, I actually have this in a video for next thursday, or right now on patreon.
@charleslozano5975 жыл бұрын
@@RyanLaley oh nice im actually a patreon, in what specific video do you mention this? ive noticed you have quite a few other ai related videos.
@charleslozano5975 жыл бұрын
Nvm I found it. Thanks for the great content btw.
@SpiritMagicka3 жыл бұрын
1:39 let's capitalize this because it's going to set me off... i LOL'd. much relate bro =]
@seatony99175 жыл бұрын
Why add AIPerception component to the controller not to character self? How to show debug draw like PawnSensing component?
@RyanLaley5 жыл бұрын
You are able to give the same AI controller to multiple pawns. So you create one AI 'brain' and give it to multiple different characters. Debug is shown by pressing the apostrophe key and using the number pad to turn off/on views.
@JaredKellen4 жыл бұрын
The AI sees my character but it doesn't seem to be setting the bool to true? And sometimes it fails to set the player location it will give 0,0,0? No idea what i'm doing wrong. If i change the bools around the Ai starts to follow like it should.
@JaredKellen4 жыл бұрын
So after using a debug string it keeps sending true then false! So I bool keeps changing from true to false....WTF
@OlEgSaS323 жыл бұрын
@@JaredKellen wow, im having the exact same problem right now, please say you stumbled on a solution in the 2 months since you posted this
@OlEgSaS323 жыл бұрын
@@JaredKellen actually never mind, it wasnt my issue after all, i was looking at my behavior tree trying to trace a problem i was having, only to realize after a 4 hour witch hunt that i was looking at the default behavior tree of the blueprint (one that doesnt exist in the game world but is in your assets folder) and not the one of the actor actually running ingame, i had to switch what i was looking at from a drop-down menu in the upper right hand corner as marked C_1 instead of the default C_0
@cvoiceofficial5 жыл бұрын
Is there any way yo not have to type in the "LiteralName" box? I would love the ability to make changes and not worry about making sure its set correctly if I change the name or something
@SpheraculGames5 жыл бұрын
You can make a name type variable and use that whenever.
@guillaumepradier47573 жыл бұрын
I think the break ai stimulus just don't work for me there, i have no fucking clue why
@tylerbaker28734 жыл бұрын
So when doing first person do I cast to player character ?
@ivankorytko33873 жыл бұрын
Cast is used when you want to reference specific object. In the scenario with player you chose "PlayerCharacterName_Character" class. Another example if you want AI follow another AI, you have to cast "AIToFollow_Character" class. Hope it make sense.
@peiluntan97814 жыл бұрын
really loving this series so far! but i'm having trouble with getting the ai to chase me - right now when it sees me it just stops and looks at me till i move out of its sight again. would appreciate any help on this!
@peiluntan97814 жыл бұрын
ah, figured it out. looked through the vid again and turns out i didn't tick success in the finish execute node
@danielpower57135 жыл бұрын
if anyone can't seem to get the npc to follow you correctly check to make sure it's the player character not player controller getting the actor location on find player location. Took me a while to figure that one out >.
@wei88565 жыл бұрын
How can I transform player controller to player character,I guess it's the problem that my AI can't follow my MotionControllerPawn in VR template.Please help me
@danielpower57135 жыл бұрын
@@wei8856Hope, I'm not too late.. but I'm not sure what you're trying to do. What I did first was I used the player controller to get the players location but later on, I figured out he was using player character so I just used the player character instead and the npc followed me. Hope that helps..
@DronX_5 жыл бұрын
it would be great an AI school of fish school. Is possible to make that?
@adrianpereyra57224 жыл бұрын
Thanks for this Tutorial! For some reason CanSeePlayer Does not turn TRUE when it is seen by perception. I Debugged and Perception is Finding me perfectly. What am I missing !? Thank you!
@adrianpereyra57224 жыл бұрын
@@CA-wr2fh CanSeePlayer:False ... even when perception sees me. cant figure it out.
@RyanLaley4 жыл бұрын
Turn on AI debug mode ( ' key when looking at the AI) and turn on perception debugging. You can see if the perception is working. If it is working as intended then the error will be where we tell it to change the boolean. If it doesnt work then it something wrong with the setup of your perception component/nav mesh etc.
@MrMurp352 жыл бұрын
I had a similar problem. It turned out that I had another NPC AI selected in the NPC blueprint pawn.
@reidcharkowsky13785 жыл бұрын
Everything works great, except the NPC pauses before moving to the character's location and a random location, instead of just a random location. Any ideas?
@RyanLaley5 жыл бұрын
If you have the cooldown decorator on the sequence node, remove it. Otherwise send me an image of your task BP