As Tim said, make invisible waypoints at each corner of each obsticle. Then have the enemy move to the nearest waypoint that is also closer to the target.
This meathod is not foolproof however. If the enemy ran into a cresent shaped object, he would not be able to find his way out.
...The seeing the player code would be relativly simple if you don't acount for obsticles in the way... more or less, if the enemy is facing the player, and within a certain distance, then the enemy will start fireing...
well... I hope I helped...
Programming isn’t an addiction, its more of a mental and social dependancy.