hide walls that have a used tile behind them, depending on the angle of the camera
Besides the set the walls to be “always up” and “always down” add a third mode, that automatically puts the walls down if they are on the “inside” of a building. The overly simple method to determine this is if a tile that is not just ground/grass is behind that piece of wall – depending on the camera angle looking at it: