Download

Is anyone having trouble with pawn hearing in 4.5?

Like the title says, I can’t get my bots to hear noises.

Yep, same for me. Everything worked in 4.4.x, and NoiseEmitter etc. are still correctly attached…

So, i tried to debug the sourcecode, and i was a bit lost in there, cause i could not find out how the ManagerTick - method in the PerceptionSystem is called (cause it doesnt get called and that seems to be the root cause to the problem).
I may be checking out the source for 4.4 this night to compare the behaviour to 4.5…

For now there is a workaround: instead of calling MakeNoise on the Actor or Pawn, get your NoiseEmitterComponent and call MakeNoise directly in there (i.e. blueprint: GetNoiseEmitterComponent->MakeNoise).
But be aware that this method needs an instigator AND a location (MakeNoise on the Actor needed only one of them).

Cheers,
Indy

I’ve tried doing as you said but I’m not having any luck. I don’t know if it matters but my instigator is a different actor than the one with the noise emitter.

If Have put everything at it.

Have tried taking out “Make Noise As Actor”, no good. Have put a print string in, and “F” is ok.

Makes noise in my game, but AI, goes straight buy.

Capture.JPG

3fece3cb5a6f5a84e65f15afaa303c55a80be5a8.jpeg

3c6e7bc4644c98c2dd15df1d86a4fb65cc923773.jpeg

Narg

Hi Narg,

I assume the “F” is inside your “MyCharacter” blueprint? If so, a few things … the “Make Noise” as a target should take in the “Pawn Noise Emitter” as you have in your second “Make Noise” call, but you have the “Loudness” set to “0.0”, change that to “1.0.” Delete the other “Make Noise” call on the top and be sure to connect the “Get Player Pawn” to the “Noise Maker” in the bottom “Make Noise” so it looks like this:
e66740cd3178f5366a40a8563de10553ae0e0017.png

Secondly, is the “OnHearNoise” inside your AIController? If so … looking at your graph, you have “PlaceBoolKeyName” input into the “Set Value as Vector” node and “InvestigatePositionKeyName” into the “Set Value As Bool” node. Shouldn’t it be the other way around? :slight_smile:

Let us know if you’re still having issues after these changes.

BINGO!!!

All it needed. Missed the 0.0 Loudness. NOOOOOOD

EDIT Still picks up voice, now locations fail.

Looks like this now, but Ai does not move to me.

1b5c32cad4a286104d3e13baf3d5f494873745fb.jpeg

Bool Value

240929d12f2112c9275c4fecacb50ec9b58540dd.jpeg

Behavior Pattern

a8e13ab0747dcb3f173bb2c1ff1a5296c60da4b6.jpeg

States Vector is invalid

Thanks again

Narg

Pawn hearing not working was a bug in 4.5+ that was fixed some weeks back (don’t have the commit link off-hand but I know it was fixed because I bothered RCL to ping Mieszko to fix it :smiley: ).

Though I am not sure if this fix made it into epic/4.6 or not, but it is definitely working in epic/master as I used it in zoombapup’s AI guard tutorial. You could also try epic/promoted for a more stable branch, although current epic/master is working fine for me.

Works fine with 4.6.1 and 4.7. Zeiten got it right for me. Typo in Key Name. Thank you Zeiten.

Just working out the Behaviour Tree to work the way I want now is my next issue.