Question about sensors

Hello, I’ve been fooling around with BGE for a little while now and I’m fairly comfortable with it (for a scrub). My situation is this, I have an always sensor feeding into a python module that control’s the AI’s movement. When the AI triggers its state “Find cover” it needs to search for the nearest cover tile available to him. Now I’ve done this linking in an near sensor but my understanding is that its always triggering the script alongside the always sensor which I don’t want. So finally the question, is there anyway to have a sensor but have it only activate on demand to get information rather than acting as a trigger?