There's only three ways to detect damage taken by a building.
(Best for gauging if buildings have taken minimal damage) Task a villager to it. If the player's stockpile goes down, you can tell that damage has been done. Drawbacks: You'll have to use Damage Object triggers to compensate for the repairing, the villager can get in the way, and you still can't tell how much damage has been done.
Damage it even more. With a clever system of triggers, you can check to see how much damage has been done to it by measuring how much damage it took to finish it off. This has the obvious drawback of destroying the building, however. (Best for gauging if buildings have taken high damage) Try to garrison a unit in it. You can then tell if towers, castles, or TCs have taken severe damage. However, you can't garrison units with triggers, so a better solution might be to place units in there at the start, then use triggers to detect when they eject. Alternatively, place a king nearby so that it tries to garrison automatically.
All three ways have their limitations, and there really is no good way to tell if a building has taken around half damage. It's the best I can come up with, though.
zyxomma100-
Age of Kings Heaven forumer
Proudly thwarting Dark_Aro's evil plans since 2002
"There is nothing more sad than watching a teutonic knight chasing a petard."