Disable aiPerceptionStimuliSource???

Hi i have some npc with the actro component aiPerceptionStimuliSource, and i tried to create a pool of that npc for the control of the memory. I create the npcs and try to desactivate everything include the aiPerceptionStimuliSource, but for my in bluepint is not work, i try the nodes deactivate, Set Component Tick Enabled and Set Active.
With that nodes i can see the ball of the sense sight when my npc die or i can see ball of npc was not activated of the pool.


In this photo i can see three balls blues from the npcs was not activate.
Thx for the help.

I was recently dealing with the same issue

It turns out if the senses have no age limit, then the AI perception component will never forget about targets

During deactivation of the stimuli source component, it sends a not sensed stimulus to all listeners, but if there are other stimuli from earlier with infinite age, then the perception component will basically ignore the new stimulus

Seems like it’s an oversight on the engine’s side, and I had to modify the engine code a bit to make it work as expected (source is deactivated → listeners forget about it and no longer sense it)

Perhaps consider adding an age to your senses, or maybe bind an event on your AI controller for when the target dies to call Forget Actor on the perception component

1 Like

As you say i dont have limit on the age, but i dont understand how my npc get that things if i have the node get currently perceived actors, so if i hidethe actor and also deactive that thing is wrong of the aiperception not?