There is a bug after this video which causes the NPC to stop seeing the player. This is addressed and fixed at the start of the next episode.
@jey84465 жыл бұрын
Whar are you going to do for the next episode, me i Want a long range attack, thx for the reponse An Algerian
@RyanLaley5 жыл бұрын
The next episode is damage sensing. After that it will be the EQS, then it will be long range attack
@jey84465 жыл бұрын
@@RyanLaley very helpful ansewer thx
@artymat82305 жыл бұрын
@@RyanLaley Excelent series man. When are you going to upload or make that video may I ask ? Let me know if it will be somewhen at tommorow. I'm truly in rush and this information is crucial :/
@RyanLaley5 жыл бұрын
It is up now for my Patreon supporters. And then will be available to public on Thursday
@Birdjuice915 жыл бұрын
For those wondering, if you can't get your AI debugging to work, you have to actually be looking at the AI before you press the apostrophe key. If you don't then the debug opens but the engine doesn't know which AI you are trying to debug. You'll know you've got it because you get a shitload more info if you do it correctly.
@Scarab12334 жыл бұрын
It might end up in crash as well, so be careful tho ;)
@conkerthesquirrel43312 жыл бұрын
ty
@felixhartl48132 жыл бұрын
EnableGDT is a good command
@martinds935 жыл бұрын
The problem i get is that my AI get stuck on the node "Rotate to face BB entry", he doesnt move when gets there... But if i remove it, it works fine.. EDIT: I found this solution: If you don't have the UseControllerRotationYaw set on your pawn, it doesn't work
@N317V5 жыл бұрын
Thanks! You just saved me!
@deod1165 жыл бұрын
@laughinmann5 жыл бұрын
Yeah this caught me aswell since I've followed the entire series and we turned it off in an earlier video, comment needs to be top.
@RH-of5cr5 жыл бұрын
Actually you don't need that set as earlier in the tutorial we turn it off. The trick is In the Movement Component of the NPC blueprint. Make sure to disable Orient Rotation to Movement and tick Use Controller Desired Rotation to enabled.
@Grimsikk5 жыл бұрын
@@RH-of5cr Thank you, this fixed it for me :)
@user-yn6xr5fd9u4 жыл бұрын
can you add the audio files maybe? 😅
@hellsgate7004 жыл бұрын
I had a problem where the npc would still go to the location of where I made a sound even after it already saw me. To fix this change the max age of the hearing sense under the AiPerception of your NPC_AI to 0.1. Then add the stop investigating task at the start of your Chase Player sequence. So it would forget immediately where the sound came from, but would still follow the investigating part in the behavior tree. Then if you interfered, it would forget all about that whistling spot.
@agentarachnid20095 жыл бұрын
Thank you for doing this. Finally a decent tutorial on how to do this
@mnl_lnm5 жыл бұрын
Don't know what I did wrong but when my character is spotted the npc always know where i'm hiding, even if sight is lost
@damienmcilrath24702 жыл бұрын
A few years too late to help you but I just ran into the same issue. Lowering the 'Auto Success Range from Last Seen Location' value from 1500 down to 200 fixed the issue for me.
@jeshiabood67523 жыл бұрын
bro really thank you so much plz keep it up u just guided me where i couldnt find such tutorials u deserve so much u are great thank you
@clebo993 жыл бұрын
I had to wait 10 episodes to be told about the AI debug??? I thought we were friends!!! LOL.....great tip. Thanks so much for that.
@lewismurphy15622 жыл бұрын
I have a random unknown stimulus in my array of "Info Last Sensed Stimuli" on the "Get Actors Perception" node. It's been populated in this array at index 1 but does not give me the name of which sense config it is when I try to print string it. Any ideas about what this random perception stimulus it could be?
@MarkOfArgyll5 жыл бұрын
Love this, AI in games interests me a lot. Thanks for sharing :)
@phillips77063 жыл бұрын
Hey, can you make a tutorial of how to add chase music, plss
@Grujadbassman4 жыл бұрын
I have a weird bug that I'm not sure if you have or not...basically if I stand still and the enemy comes to me he keeps going into the attack animation and then stops immediately. I think by experimenting that the problem is he constantly tries to get to my exact location so he is stuck in the parallel execution, does anyone have this problem or maybe know a workaround?
@aquagamerstr11925 жыл бұрын
To open debug menu, you should look at the AI.
@amysmilebatto5 жыл бұрын
I would first like to say this is a great video and helped me out a ton! However, I noticed an interesting bug that I want to point out for a specific case I had. I'm using this AI in a grenade-focused game and wanted to have the enemies investigate explosions they hear. However, because the grenades could be thrown to areas unreachable by the nav mesh, the AI would seem to bug-out and keep repeating the "rotate to face, make sound, wait" part and then restart when it reached "move to". I found that the solution was to project the sound's location to the nav mesh, so that the AI could get as close to the sound as it could without error. Now it works perfectly.
@amysmilebatto5 жыл бұрын
Additionally, you can make the AI change targets by flicking "IsInvestigating" off and on again, allowing it to abort and restart its search with a new target.
@everettlee794 жыл бұрын
What did you use to project the position to the nav mesh.? I have a similar problem when my AI lose sight of me while i’m in the air outside the nav mesh.
@minyman362 жыл бұрын
My stimulus tag always returns "None". It just can't tell the difference between sight and sound
@amberhams4 жыл бұрын
My AI is always able to find me even if its lost sight of me. So once it loses sight it walks back to its patrol point as normal, but if I start walking towards the AI walking away. it will automatically turn around and start chasing me (and no I'm not walking in its hearing range). also when this happens can see the player is set to true.
@mizerama13 жыл бұрын
I am thinking your issue is that when Ryan had us set the AIPerception Auto Success Range to 1500, it was crazy overkill. 1500 is further than you can move away from the NPC so he will always find you after the initial detection since it's a radius... as long as you're still within 1500 unit of the last place the NPC found you, they will still know where you are. imgur.com/a/PKtOOTc
@amberhams3 жыл бұрын
@@mizerama1 ah ok thanks
@davidfails28664 жыл бұрын
21:22 the npc no longer sees the player before sound queue. please help
@Preirin2 жыл бұрын
Odd - the sound cues in the Behavior Tree worked fine for me... Rotate / Play Sound / Move to / Wait / Play Sound / Stop Investigating.
@kingades10132 жыл бұрын
8:49 *The info output is the sense so it has to be broken*
@kingades10132 жыл бұрын
*For each loop performs a function on every individual array. For each loop is a macro node*
@kingades10132 жыл бұрын
9:34
@StuffsS6484 жыл бұрын
If you're having issues with the AI going back to patrol before reaching the sense location, try going to AIController > AIPerception > AI Hearing Config > Max Age and set the value to 0.
@khalshal84392 жыл бұрын
i have a bug with the rotate to bb entry
@васяпупкин-я9ш6ж4 жыл бұрын
Hi, please help me. When the AI notices me in my place, a sphere is created ( it is visible in debag mode ) and if I cross this sphere ( no matter where the AI is), it still runs to attack me. The scope can be enabled or disabled in the settings of the AI Detection by Afiiliation. How can I fix this
@jonathanxdoe3 жыл бұрын
Why not generalizing the task as reset bool exposing the variable?
@FrancescosToon5 жыл бұрын
I have a little problem, when i distract the AI it doesn't create a yellow sphere and doesn't investigate! 🙁
@FrancescosToon5 жыл бұрын
I also added an animation for when he's investigating but if it stays false, it wont play anyway
@FrancescosToon5 жыл бұрын
Also i added a new investigating state and an animation to play at the end but if the investigating wont start it's useless.
@FreaksOfFun4 жыл бұрын
hello i have issue i did every thing you did exactly but hearing sensing it does not working when see chase me something madness
@AbdulAhad-uq7jr3 жыл бұрын
Don't know what I did wrong but when my character is spotted the npc always know where i'm hiding, even if sight is lost(2)
@MegaAgiri3 жыл бұрын
I didnt have any problem putting the sound in AI Tree, works perfect.
@_jmgomez_4 жыл бұрын
Any reason of why you are not using the same Enum for all the potencial states of the AI? Booleans gets messy very quickly.
@Aiden-wg3uf5 жыл бұрын
Dood you are the man, your tutorials are great! Keep it up :)
@JoeTheSpaceGuy5 жыл бұрын
Great! Can you make the AI communicate with each other as well? So if one AI sees the player, it will call for help and more will come looking for the player :D
@ВластелинКриперов5 жыл бұрын
I think you can just do it via noise reporting by NPC who seeing player
@DrPenny2334 жыл бұрын
After this my ai has stopped wandering after doing this, he now just stands in place is there anyway to fix this? (It only moves when it sees me)
@shinami29014 жыл бұрын
same over here :/
@nagybalint14744 жыл бұрын
learn basic ai 😆 you just need to renove or change some stuff for me it works flawlessly
@yucelb4 жыл бұрын
Hi Ryan I'm following the videos fondly,don't hide from the enemy by squatting and the enemy to come to the sound can you prepare a lesson?
@nagybalint14744 жыл бұрын
you need to set up up so when player crouches he is deaf or smth like that
@andytenshi4 жыл бұрын
The bug I'm running into after this tutorial and after fixing the sight bug is that if the enemy is chasing me. if I whistle he will run to the whistle location. I've been trying to mess with the behavior tree to get him to ignore the other senses when he sees me but no luck so far.
@TheGhos1Face5 жыл бұрын
Hey can you help me with something my ai does not stop investing pls help
@markdoyle98634 жыл бұрын
Great tutorials, Thanks. Does anyone know why the perception debugger doesn't show up. Already mentioned below but none of those suggestions have worked for me. Using 4.24.
@michaellustig13602 жыл бұрын
Use the Numberpad Keys not the numbers over the letters.
@jameswilliams23733 жыл бұрын
i have followed this exactly but my AI does not rotate towards the player and just stops patroling and stands there any ideas would be awesome
@jameswilliams23733 жыл бұрын
it works when i remove the rotate.
@AlexRodriguez-jc8cn2 жыл бұрын
@@jameswilliams2373 whatd o you mean when you remove rotate?
@defiant4eva3 жыл бұрын
I am not sure if they changed something between this version of UE and the one I am currently using, but playing the voice clip that I set up. Obi wan saying "Hello there" in the behaviour tree between the Rotate to face BB entry and Wait. I also added a wait after the Rotate to face BB entry, because as soon as I whistled, it would face me and play the sound clip. This is a SS of my BT imgur.com/64ALZNE
@brianjordaans67823 жыл бұрын
Seems a long shot I will get a response on here after all this time but I am stuck. Been following along with your videos and once I added the hearing portion my AI can see the character from the very beginning, the moment I hit start the AI charges for me. Looking at the behavior tree its saying that the cannotseeplayer branch fails instantly meaning, it goes straight to the canseeplayer branch and I cannot figure out why. Any help would be appreciated.
@brianjordaans67823 жыл бұрын
Side note, it appears that it is only able to sense the player if it is close enough. It can see through walls but I moved the AI far away and it worked fine, but the moment it gets close enough that the player is within it sense range it switches to the canseeplayer branch even though it cannot possibly see the player.
@cortexgames10435 жыл бұрын
Hi awesome tutorials. is it possible to get the "hearing range" via blueprint? there is a function called "Hearing Range" but it requires a "ai hearing config object" reference, but i cant find any function to get it. (also cant find any help on other sites) the problem is: i need a "lose sight radius" equivalent for the hearing sense , but there is no such thing
@phosphornaut68113 жыл бұрын
Spent an hour at a total loss trying to work out why my ai wouldn't investigate the noise. Turned out I had typed a space in my BB Target' 'Location. Praise Debug mode. Edit: I had some further issues with SightSense breaking. To fix this I used the node ' Get Sense Class for Stimulus' to then run checks on which stimulus the ai was perceiving.
@FabioBasileVFX4 жыл бұрын
Well i got happily to part 10, everything working fine and having fun getting chased and sparring, until i closed ue4, and then reopened, and after that the pawn just stays in place, and just turns towards me like he wants to chase me, but can't move from its position. If i run around it, i can see it responds by turning in my direction, and even triggers the attack animation, but it just can't walk or run anywhere... anybody else having the same issue?
@althuang16304 жыл бұрын
My AI always triggers both IsInvestigating and Seeplayer when he saw player or heard player and he will start investigating to the noise location and then move to player location to chase player im so comfused.....SAVE ME PLZ
@michaellustig13602 жыл бұрын
You need a decorator on the Investigating Sequence node: CanSeePlayer is Not Set (aborts self)
@capotavola5 жыл бұрын
nice tutorial i likje your style and workflow ! i got a little problem with the hmmm sound ,it repets the sound continualy olso if he saw me and come to me and attack me stil sound fired 100 times after a few time how resolve this pls thx in advance
@II-er7gj4 жыл бұрын
@Ryan Laley - This is very nice - but can you do brand new tutorial series about this Smart AI that can react to any sound in surroundings in game and can hear players footsteps, react to gun sounds, any sound that AI thinks are suspicious and AI will go to patrol to check it out where the sound came from and if AI spots and sense the player (including buy only sound and / or sound as well) the player then starting to chase the player and attack to player or players in multiplayer game). Plus in multiplayer - where many human players play together with AI as enemies - how this AI could ow will behave? How AI will decide whom he will first go and attack? In scenario if nobody from players shoot to AI - how AI will decide first to attack - to closet or to further away player? In scenario of if one and in scenario if both players shoot AI? In scenario - if players are not visible for AI but AI can hear gun sounds or footsteps from a) one player b) from two players c) closest gun shoot c) far away gun shoot same time with closest gun shot form player. Can you do please many these AI Scenario video series please? Can you make some hardcore smart AI that don't gives up until player are dead or AI are killed by player?
@II-er7gj4 жыл бұрын
Plus could be nice if AI can react to players in multiplayer game who are speaking in microphones - if AI can hear players chatting with another player then AI start to attack if AI can hear players voice / voices. - can you do such advanced AI tutorials PLEASE? :)) That could be very cool!! :))
@AlexMystogan4 жыл бұрын
why after i press apostrophe key i can't change to numb 4 for AI perception ??
@michaellustig13602 жыл бұрын
You have to use the Number Key pad.
@AlexMystogan2 жыл бұрын
@@michaellustig1360 i already completed my game and graduate from college, but thanks for reply
@osakanone5 жыл бұрын
Is there a way to add a delay to AI perception based on the distance of the sound if it is still heard?
@TheGhos1Face5 жыл бұрын
Hey man i found out that the change status was causing the problem i don't know why but if i don't use it it works the one with the chasing
@bobbyr5 жыл бұрын
Hey Ryan! Thanks alot for the great tutorials. I wonder if you have a way of making the AI not snap turn on the noise? Right now he just turns in like a millisecond. Would much appreciate any ideas, thanks!
@RyanLaley5 жыл бұрын
In the enemies character movement component, there is a setting called rotation rate. Turn that number way down.
@cyberrb255 жыл бұрын
Is there something required to set up the audio file? I can't load in a WAV file, and the MP3 one isn't looking good either. [UPDATE: See on the replies]
@RyanLaley5 жыл бұрын
Nope just a standard wav file will do for the import. (MP3 is no good)
@cyberrb255 жыл бұрын
@@RyanLaley I had already tried with the conversion tool on VLC player (funny so many people underestimate it's potential), and the results were a hard nope. Today, I've checked, and I'm looking that the WAV files have to be quite specific. I'm leaving where I found this here (forums.unrealengine.com/development-discussion/content-creation/118819-can-t-import-wav-files-into-the-ue4), but the gist of it is that one requires the WAV file to be 16-bit PCM. It also offers an online tool for it which allows you to tinker with the metadata for the audio in the said message board. I'm replying to your message, but also saying this so people won't be stuck just like me.
@slimelabAK5 жыл бұрын
You also have to right click on the imported sound and click create cue. The cue is what you reference in the nodes. @@cyberrb25
@aamirhussain11315 жыл бұрын
Hi nice tutorial please make tutorial about eqs to cover and hide him self for while
@RyanLaley5 жыл бұрын
Coming next week for Patreon
@AlexMystogan4 жыл бұрын
what is the key?
@masonmids4 жыл бұрын
The AI can’t see me anymore help I’m desperate
@nagybalint14744 жыл бұрын
great video thanks for making it 😃
@masonmids4 жыл бұрын
The AI can’t see me anymore help
@Unexist123 жыл бұрын
If you have more AIs in level then they detect each other also
@juliandesia35645 жыл бұрын
I need a little help with something, if anyone might guide me or give an idea please, when i create a new Level i have this problem with the NPC, i called everything the same as the tutorials, Blueprint Runtime Error: "Accessed None trying to read property PatrolPath". Blueprint: NPC_AI Function: Execute Ubergraph NPC AI Graph: EventGraph Node: Ajustar valor como booleano (adjust valor as boolean) Blueprint Runtime Error: "Accessed None trying to read property PatrolPath". Blueprint: NPC_AI Function: Execute Ubergraph NPC AI Graph: EventGraph Node: Ajustar valor como punto flotante (adjust valor as float) Im still a noobie, so i have no idea what to do, thanks everyone, and obviously special thanks to Ryan if not for your tutorials i would never dowloaded UE4 and try it out :)
@stephenhidalgo76085 жыл бұрын
Thank you for helping the community, can you make a tutorial on how the bot strafe when attacking, many thanks
@Nachkadi4 жыл бұрын
Thank you!
@geoffrey36685 жыл бұрын
Great video again! This become well together! Thanks!
@MassiveKrull3 жыл бұрын
Thank you so much for doing this. I've learned a great deal and finally been able to understand and create AI in ue4. However if you have two AI's roaming and one sees the other, they will immediately chase the player haha. There needs to be a way for the AI the recognize the other AI as friendly thus preventing this from happening. I have finished the series, but there is no such fix. Otherwise great content.
@jamesmclemore91233 жыл бұрын
I came up with a quick & dirty solution that probably work if you're trying to implement co-op or ally NPCs, but it seems to work for single player. First you should probably go ahead and watch the net vid in the playlist, because that's about where I was figured this out and it significantly rearranges the perception logic. Assuming you've gotten through the next vid already, you then need to add a boolean input to the "Complete Sense" function (I called it 'hostile'). Next, go to the Event Graph and drag out from the "info target" node of the "Get Actors Perception" block and put an "==" block on it. Hook the other input of the "==" block to a "Get Player Character" block. Plug the output of the "==" into the new 'hostile' input on the "Complete Sense" function. In the "Complete Sense" function graph, put a branch block between the switch block and the block that sets the 'CanSeePlayer' blackboard key. Then connect the condition to the 'hostiles' input at the beginning of the function and you should be done.
@ArvindKumar-mi7rv2 жыл бұрын
@@jamesmclemore9123 I'm using "On target perception updated" casting to player then set value as bool(canseeplayer) so how i can do this
@ty_teynium5 жыл бұрын
Ten parter? Oh boy I'll sure be busy tonight!!!
@RyanLaley5 жыл бұрын
Plenty more to come too.
@kinghados4 жыл бұрын
Very Good video, Thank you so much
@CaltropCreations3 жыл бұрын
i added the collapse noise instead of a whistle, Now the AI runs away instead
@michaellustig13602 жыл бұрын
The sound you use doesn't matter. The ReportNoiseEvent causes the AI to wake up.
@conscientiamstudios5 жыл бұрын
Thank so much
@TheWitcherWolves5 жыл бұрын
Does this Distraction also work when the NPC sees the player? I mean with no whistle, just sight. P.S Great Tutorial.
@RyanLaley5 жыл бұрын
There is a bug after this video which causes the NPC to stop seeing the player. This is addressed and fixed at the start of the next episode
@TheWitcherWolves5 жыл бұрын
@@RyanLaley Will be waiting. Do you recomment any books for unreal engine 4? I've found a book Building an RPG with Unreal 4.x, and wanted to ask if it is good to buy it or not.
@RyanLaley5 жыл бұрын
I would only recommend making an RPG when you are more comfortable with unreal. It is such an expansive genre with tons of mechanics it is just a world of pain. Instead think of smaller projects and find a book that supports that. A book that aims to get you to make an RPG is setting you up to fail in my opinion.
@TheWitcherWolves5 жыл бұрын
@@RyanLaley Good to know. For now, I'm just writing the scenario for an big RPG, but for now I will focus on a game with rpg elements or without. Too many ideas, too less time. Thanks again for your response.
@Anil_Kumar_K5 жыл бұрын
Can you do multiplayer melee AI tutorial?
@mightyenigma15 жыл бұрын
It should work the same. AI Controllers run on the Server, and CharacterMovementComponent replicates and smooths Movement Input between server and clients automatically
@alexruas62354 жыл бұрын
Iv' been breaking my ass all over this XD. if you character does not move, try without using the rotate BB. It completely worked for me. Plus i deleted the hearing from the main sensing and created a new sence only for hearing, wich made my ai BB much cleaner and simpler(correct me if that can generate issues later on please) and made a new BlackB key to separete from target Loc tree, do no if that was necessary, but now i can tune my 'Target noise' to be a little less accurate. hope this helps someone
@NutTapper4 жыл бұрын
4:00
@ryangregg19164 жыл бұрын
my AI just stands still when it hears the noise, will only investigate it if it has already seen me then losses sight
@kt_lavigne062 жыл бұрын
I put a bunch of enemies down and got them to attack me, but when I added a sound effect for the hit I realized that they were all attacking in a polyrhythm