I can see that the Enemy hears the trigger but not function being called



I’ve hit a wall here.

I seem to be getting a hearing trigger but not function is being called. I have inserted print strings along the way to try and debug but the fucntion doesnt seem to be getting called. (On Target Perception update(AIPerception)).

Any ideas on waht would help to fix this?

Also here is my BT_EnemyGuard

Are you able to confirm that the event is not being called by placing a breakpoint on it? Also, does the same issue occur if you remove the sight sense? (you can always put it back later). I also see an empty index for sense configs (not that I think this is a cause, but curious as to why it’s there)

I’m not sure how the break point works but i put a print string node there to print hello if it does work. And that isnt running. So surely the event isnt being triggered?

The empty sense is just there cause i clicked add another sense by accident. But surely thats not causing the issue? I also put hearing as the dominant sense and the sight still works but the hearing is still missing the same functionality.

Tried the looking at the blend tree but it never switches to the hearing logic.

Ill try remove the sense component and see what happens

So I fixed it.

I’m pretty sure that it was an issue with the Variable. I initially added a space between the ‘SoundLocation’ in the 2 words in the name of the Var = “Sound Location”. So i edited it after creation. Then It broke. So i made a new variable and now it works? First experience of Unreal being Janky but I work with Unity a good bit so im not surprised cause I often feel like this stuff happens over there.

Unreal is definitely no stranger to jank as well. I’m glad you were able to find a solution!

I think the problem is related to the hearing trigger settings or the configuration of the target perception. Check that the activation conditions for the trigger are set correctly and ensure that the target perception parameters are set correctly. Is the function called from the appropriate place in the code and has access to the necessary resources? Try restarting the game or examining the logs for errors that may help identify the problem.

Privacy & Terms