Moving this here instead of editing my previous post:
This causes the AI to go to the location of the last heard noise first
Ok I guess I didn’t read your question good enough =)
If it never heard your actor, then this location will be garbage. If it isn’t garbage, then that means that it hears your actor (and that isn’t yet forgotten) and SuccessfullySensed will be true. Further you’re executing this logic everytime any sense get triggered (so even if it sees something new or stops seeing something new you execute the hearing branch and if there is still a not forgotten hearing stimulus SuccessfullySensed will be true there). So what are you trying to do?
Also, wouldn’t it be impossible to separate the sight and hearing branch using SuccessfullySensed since it is true whenever any sense is successfully sensed?
No it won’t be true for any sense. What you’re doing there is you’re looping through the last stimuli of the three senses you have and SuccessfullySensed is per sense, so it can be true for one sense and false for another.