Recently...place some wps and end it with cycle wp to create a loop.
Then put next wp behind cycle fx hold, defend, patrol or seek and destroy.
Set up a trigger where set:
Activation - west detected by east for example, or vice versa, choose a radius.
Be sure to place wp after the cycle within the radius, otherwise it will take long time to find intruder.
Then synch this trigger with last wp you added.
So when a foe appears and your patrol will detect him, the trigger will go off and they will cancel
patrolling and start searching for him.
This far I have gone in my memories, how to take them back to patrolling I better find somewhere ;D