If units builds a building he cant build another one. The best way would be hiding buildings icon in build list but when building dies it must be back there hope you got my idea.
Unit - A unit Is issued an order targeting a point
Conditions
((Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Footman))) Equal to 1) and ((Issued order) Equal to (Order(YourBuildingOrder)))
Actions
Unit - Order (Triggering unit) to Stop
This trigger checks how many units of that type are already in the map and whether the issued order is equal to 'build YourUnit'. If these conditions are matched, it orders the building unit to stop.
You should include another condition to the trigger I posted then:
Trigger:
Unit built
Conditions
(Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Knight))) Equal to 1
Where "Knight" is the upgraded version of your building. If it is equal to 1 it means that there already is a building of that type in your map and hence, you can no longer build the non-upgraded version.
then make another trigger checking for if there is any of those upgraded buildings, just add to the conditions.
If you have multiple people that can build these buildings, and want each to be able to build 1 each, I suggest you make a boolean array that is turned "true" if the building is built, each index of the array 1-12 can refer to a player. If one of the buildings is destroyed(any of the upgrades+the first building) then check the owner of it and turn that slot in the boolean array to false.\
you could also copy the op's trigger, add the extra condition, and an additional one to check for the players color, check if any of X units(for triggering player) exist for (triggering unit's player).
I prefer booleans, but this would work neat and simple as well if you have multiple people that can build a single instance of the building.
I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
I'm on a page about incorrect corrections, and spent the better part of like two hours trying to get someone to understand that -5^2 = -25, not 25, and then that post had comments get reposted because that group is self sustaining, and that person was in turn trying to explain what I just explained to them. And I'm taking that as a victory