# How do I access which sense is updated in the AI Perception system?

**URL:** <https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582>\
**Category:** AI\
**Tags:** unreal-engine, artificial-intellige, question\
**Created:** [September 9, 2015, 12:32pm UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582 "2015-09-09T12:32:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sigurd\_Cesar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sigurd\_Cesar](https://forums.unrealengine.com/u/Sigurd_Cesar)\
**Post date:** [September 9, 2015, 12:32pm UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/1 "2015-09-09T12:32:25Z")

</div>

Hi, I’m currently looking into the UE4 AI systems and have run into a problem with the AI Perception. I can’t figure out how to access the individual senses updates in Blueprint. If I have both Sight and Hearing how do I access the hearing sense specifically?

So to simplify: If, for example, I want my AI to jump when he sees me and die when he hears me. How would I go about that?

---

<div class="post-metadata">

**Author:** ![Bariudol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bariudol](https://forums.unrealengine.com/u/Bariudol)\
**Post date:** [September 9, 2015, 2:21pm UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/2 "2015-09-09T14:21:10Z")

</div>

You can use the stimuli tag for the noise to make the distinction. Something like this:

 ![57916-aiperception.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/b/0fbb4379e1f818877cf9f494c1052e4a32cebe73.jpeg)

This example prints in the screen the number of the stimuli for the sensed actor and the type it belongs to. For this to work you should use the Noise tag on every noise you make. It would be nice to have a better way to do this, but right now i don’t think there is in Blueprints (if there is please let me know!). Hope this helps.

---

<div class="post-metadata">

**Author:** ![Sigurd\_Cesar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sigurd\_Cesar](https://forums.unrealengine.com/u/Sigurd_Cesar)\
**Post date:** [September 10, 2015, 9:51am UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/3 "2015-09-10T09:51:50Z")

</div>

Thanks this seems to work fine! I just hope they implement some easier method of simply breaking out the specifik sense you want soon.

---

<div class="post-metadata">

**Author:** ![insanerob](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@insanerob](https://forums.unrealengine.com/u/insanerob)\
**Post date:** [December 1, 2015, 8:14am UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/4 "2015-12-01T08:14:51Z")

</div>

You don’t need to use Tags:  
The array index from Last Sensed Stimuli corresponds to the order of the Senses under the AIPerception\>Senses Config .  
In my case I have  
0 = Sight  
1 = Hearing  
.  
Every time you loop through the last sensed stimuli array you will get each of your senses in order and all the info associated with the last time that sense perceived something. You can then use the Age to find out which sense was updated last if you like. In my case I tag the sounds to describe what they are , footstep, explosion etc. etc. and I only need to do that for element 1 ( hearing ), not element 0

---

<div class="post-metadata">

**Author:** ![Bariudol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bariudol](https://forums.unrealengine.com/u/Bariudol)\
**Post date:** [February 21, 2016, 11:33pm UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/5 "2016-02-21T23:33:39Z")

</div>

Thats really useful information and makes the hole thing a lot easier. Thanks a lot for sharing!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e8ca51a4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e8ca51a4](https://forums.unrealengine.com/u/anonymous_user_e8ca51a4)\
**Post date:** [September 6, 2018, 6:04am UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/6 "2018-09-06T06:04:04Z")

</div>

**THANK YOU**

---

<div class="post-metadata">

**Author:** ![dinasorZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dinasorZ](https://forums.unrealengine.com/u/dinasorZ)\
**Post date:** [November 24, 2021, 9:20am UTC](https://forums.unrealengine.com/t/how-do-i-access-which-sense-is-updated-in-the-ai-perception-system/331582/7 "2021-11-24T09:20:55Z")

</div>

I know it’s late, but here’s if anyone still looking for answers, this is how I’m accessing individual senses.

OnPerceptionUpdated:

 ![352939-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/1/a01c7fd6dc975aa6eaefc7ecd36152854481d1c4.png)

OnTargetPerceptionUpdated:

 ![352940-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/6/e869fa9ba88b4a06a7b4c84a1f8b5a4fbb315ac0.png)
