# AIPerception last sensed stimuli suddenly swappedposition

**URL:** <https://forums.unrealengine.com/t/aiperception-last-sensed-stimuli-suddenly-swappedposition/440377>\
**Category:** Blueprint\
**Tags:** aiperception, sight, unreal-engine, Blueprint, question\
**Created:** [December 31, 2018, 6:56pm UTC](https://forums.unrealengine.com/t/aiperception-last-sensed-stimuli-suddenly-swappedposition/440377 "2018-12-31T18:56:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_d73584db](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d73584db](https://forums.unrealengine.com/u/anonymous_user_d73584db)\
**Post date:** [July 22, 2019, 5:23pm UTC](https://forums.unrealengine.com/t/aiperception-last-sensed-stimuli-suddenly-swappedposition/440377/2 "2019-07-22T17:23:18Z")

</div>

I am running into this exact same issue… Took forever to track down. I have an AI with 4 Stimuli, and under different conditions, Hearing will be in different spots in the array. It is authored at Array Position 1, but can show up in 2 under certain circumstances.

A quick fix that worked for me ( but have zero idea why…), was to place one of the AI in the level manually, rather than rely on them all being spawned in dynamically. Funnily enough, just spawning 1 in manually fixes all the dynamically spawned ones.

I hate using things that rely on something being in a particularly numbered array entry. This should 100% be a map, or at least the FAIStimulus Struct should expose the Type member to blueprint so we can just iterate through them all and see which one is which.

---

_[View the full topic](https://forums.unrealengine.com/t/aiperception-last-sensed-stimuli-suddenly-swappedposition/440377)._
