Finding a path to nearest walkable tile, of a nonwalkable tile

That’s a very good point. Maybe my former implementation is faster than searching a big map?

here a nice A* applet to test around, also setting different costs for tiles

http://www.vision.ee.ethz.ch/~cvcourse/astar/AStar.html