Do you use GetNearestObjectBytag or GetObjectByTag ?
Your NPC can target a Waypoint on another map an try to jump to it, so he walks in the map corner to reach it...
But without any code, it's hard to find...
And for your randomly walk, I suppose another script interact with yours (and it must have a ActionRadomWalk() line if NPC can't see its target).