Not directly, but you can detect when it is damaged and setDammage 0. Can you attach eventHandlers to buildings? Dunno ... but a simple getDammage loop would do the trick.
Im sure you can pass the id of the building to the script:
object #
Where the # is the id of the building.
In anycase I was not able to stop the destruction of the building using an eventhandler. However I think this is due to the way the handler detects damage. Like it isnt detecting it fast enough.
So I tried to do the following:
_house = _this select 0;
#start
? GetDammage _house : _house setdammage 0;
goto "start"
But I am able to destroy the building with a M2.
So I do the following:
_house = _this select 0;
#start
_house setdammage 0;
goto "start"
Im not able to do destroy the building with an M2.
About it being greedy, seems that detecting if the building has damage wont work. But running the script constantly to keep the building at full health seems to work.
When I found this snippet it had a 2 second delay. I forget where in this forum I found it.
Jeff