Hi there!
I`m trying to make a system that moves AI to the source of noise, when he hears it.
I ran into a problem: AI does not hear the noise the actor makes. I set up the Pawn Sensing in such a way that the source entered the radius of noise trapping, and added the component Pawn Noise Emitter to the actor, but for some reason the event OnHearNoise does not happen. What could be the problem?
It can be that it detects only enemies sounds and the actor that emitting noise is not one. Try setting perception to react to neutrals and friends.
I already do this in my Door Actor: there is an event that play a sound, move a door by timeline and make a noise. You can see a part of logic with Pawn Noise Emitter on the second attached image.
Pawn Noise Emitter must emit noise - this is not permanent, you have to code it, for example, make noise on foot step, shoot etc.
Okey, the solution was simple: use node “Report Noise Event” with AIPerception component.
I also encountered a problem when the noise that I made when shooting was not perceived by the AI. In a new project, I created 2 Actors to check everything, but there was also no result. I noticed that I couldn’t get a link to my Actor that was playing the noise, and I realized that On Hear Noise only accepts the noise if it was played by Pawn.
This creates problems when you need to reproduce sound with weapons or simply with stones. I won’t make my own Pawn stones just because of this -_-
I’m currently looking for a solution to this problem, if it doesn’t work, I’ll start testing AIPerception.