Enemy AI and walls

Hey guys
I really need some help with enemy AI. Im making a top down (zelda style) game and basically I want the bad guys (zombies in this case) to follow the player but I don't want them to walk into walls, objects etc. How do I go about this?
I really need some help with enemy AI. Im making a top down (zelda style) game and basically I want the bad guys (zombies in this case) to follow the player but I don't want them to walk into walls, objects etc. How do I go about this?
Comments
I was thinking something like if my actors x and y is between 0 and 320x and 0 and 480y and enemy x and y is also between 0 and 320x and 0 and 480y then move to actor but when actor is in (say) 321 and 640x, then the enemy follows a waypoint system to walk through doors etc...
Will this work tshirtbooth? It makes my head hurt thinking about how to do it