# Stealth AI remembers where player is when it shouldn't

**URL:** <https://forums.unrealengine.com/t/stealth-ai-remembers-where-player-is-when-it-shouldnt/490037>\
**Category:** AI\
**Tags:** aiperception, unreal-engine, question\
**Created:** [October 19, 2021, 11:35pm UTC](https://forums.unrealengine.com/t/stealth-ai-remembers-where-player-is-when-it-shouldnt/490037 "2021-10-19T23:35:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadowthief4502](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowthief4502](https://forums.unrealengine.com/u/Shadowthief4502)\
**Post date:** [October 19, 2021, 11:35pm UTC](https://forums.unrealengine.com/t/stealth-ai-remembers-where-player-is-when-it-shouldnt/490037/1 "2021-10-19T23:35:52Z")

</div>

For background: I’m working on a stealth game with invisibility mechanics. At the moment I have it working to where when the player crouches, they turn “invisible.” When this occurs, I have the actor set to unregister from the sight sense on clock and re-register on uncloaking. However upon uncloaking, the AI knows exactly where I am unless I break LOS no matter how far or close I am. I would like the AI to “forget” once the target goes invis.  
Things I’ve tried:

- Set “max age” to values \>0
- Used the “Forget all” on stimulus update
- Setting the target to null on update

Vid: [AI Stealth problem - YouTube](https://youtu.be/ItCF1IRslVo)

Reset Task used in the BT once the AI starts wandering:  
350640-  
Used to turn stealth back off once it’s on:

 ![350651-screenshot-2021-10-19-182218.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/3/6f3ae52baf81567ad3ef1bc6fdb259959f439d1e.png)

I’m relatively new to the AI perception system so any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Usama\_Gunner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Usama\_Gunner](https://forums.unrealengine.com/u/Usama_Gunner)\
**Post date:** [May 9, 2022, 6:30am UTC](https://forums.unrealengine.com/t/stealth-ai-remembers-where-player-is-when-it-shouldnt/490037/2 "2022-05-09T06:30:06Z")

</div>

Hey have you solved this? My problem is kinda same. Enemy detects even he far away. Once he sees me he always keep me in his memory never forgets.
