how about making 3 different upgrades.. with just the info "You need 1 WarMill" or "You need 2 WarMills"
now just use a trigger and check if the player owns 1 or 2 or more warmills, and then just research one of the upgrades via trigger.. so the unit is acutally useable..
That's how I would do it..
- Upgrade
- Events
- Unit - a unit finishes construction
- Conditions
- Unit - unit type of triggering unit is equal to Blacksmith
- Actions
- set Blacksmiths<gen> = blacksmiths + 1
- Downgrade
- Events
- Unit - a unit dies
- Conditions
- Unit - unit type of triggering unit is equal to Blacksmith
- Actions
- set Blacksmiths<gen> = blacksmiths - 1
Blacksmits is a integer value.(numbers)
- AllowHeadhunter
- Events
- Unit - a unit begins training
- Conditions
- Unit - unit type of triggering unit is equal to HeadHunter
- Actions
- if Blacksmiths > 1 then do nothing else do Order training unit to STOP
so when a unit a unit finishes a blacsmith it ads +1 to the current value
and when you try to make a HeadHunter it checks the Integer value
if it is lower than 1 and removes 1 from Blacksmiths value if it dies...
if you change availability th units are not even shown.
you can use different requirements, for your first unit you make it require a normal warmill. then you create 2 more buildings. one is named "2 Warmills" and the other "3 Warmills" they are invisible and unselectable. then you use an integer as explained above (although you will have to use an array if you want it for more then 1 player). when your integer reaches "2" , you create the building "2 Warmills" somewhere on the edge of the map. the same for 3 warmills. you set your headhunter requirement to "2 Warmills" and the demolisher to "3 Warmills". the it will show the text you want. use if/then/else in the integer triggers to check if one of your warmills is destroyed and then destroy the requirement building.
if its too complicated, i can explain it otherwise, or maybe when i have time later i can do the triggers.