Still not sure what you're asking for, maybe because this sheet it seems pretty simple to me.
I first test the player X position regarding the building. If the player is between the door coordinates and the right building coordinates, then it sets the building variable "fading" to 1.
If this variable is set to 1, it decreases progressively the building's opacity. If "fading" it is set to 0, the building opacity increases back to 100.
Of course there are many ways to achieve that, and some are better than mine. Still, it's a simple way to do it.