Do you build the house? What does
own mean exactly? What is a
main production house? Remember, you can do just about anything in Warcraft 3.
Anyway, I'll assume you build these Houses with a worker and train/buy the Dragons like a hero or normal unit. If you build the Dragons then you should replace the Event "A unit Enters playable map area" with "A unit Finishes construction".
Create 2 triggers, one with a 34 second periodic interval and one with a 28 second periodic interval. Use these to add the lumber periodically:
-
Events
-

Time - Every 34.00 seconds of game time
-
Conditions
-
Actions
-

Unit Group - Pick every unit in House_Baby_Group and do (Actions)
-


Loop - Actions
-



Player - Add 200 to (Owner of (Picked unit)) Current lumber
-



Floating Text - Create floating text that reads +200 above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-



Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-



Floating Text - Change (Last created floating text): Disable permanence
-



Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
-



Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
-



Set PlayerGroup = (Player group((Owner of Picked unit)))
-



Floating Text - Hide (Last created floating text) for (All players)
-



Floating Text - Show (Last created floating text) for PlayerGroup
-



Custom script: call DestroyForce( udg_PlayerGroup )
-
Events
-

Time - Every 28.00 seconds of game time
-
Conditions
-
Actions
-

Unit Group - Pick every unit in House_Big_Group and do (Actions)
-


Loop - Actions
-



Player - Add 500 to (Owner of (Picked unit)) Current lumber
-



Floating Text - Create floating text that reads +500 above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-



Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-



Floating Text - Change (Last created floating text): Disable permanence
-



Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
-



Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
-



Set PlayerGroup = (Player group((Owner of Picked unit)))
-



Floating Text - Hide (Last created floating text) for (All players)
-



Floating Text - Show (Last created floating text) for PlayerGroup
-



Custom script: call DestroyForce( udg_PlayerGroup )
Then add the Houses to the correct Unit Group when you build them:
-
Events
-

Unit - A unit Finishes construction
-
Conditions
-

(Level of House Classification for (Triggering unit)) Equal to 1
-
Actions
-

Set TempGroup1 = (Units owned by (Owner of (Triggering unit)) matching (Unit-type of (Matching unit) Equal to Big Dragon) and (Matching unit) is Alive Equal to True)
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



(Number of units in TempGroup1 Greater than 0)
-


Then - Actions
-



Unit Group - Add (Triggering unit) to House_Big_Group
-


Else - Actions
-



Set TempGroup2 = (Units owned by (Owner of (Triggering unit)) matching (Unit-type of (Matching unit) Equal to Baby Dragon) and (Matching unit) is Alive Equal to True)
-



If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




If - Conditions
-





(Number of units in TempGroup2 Greater than 0)
-




Then - Actions
-





Unit Group - Add (Triggering unit) to House_Baby_Group
-




Else - Actions
-



Custom script: call DestroyGroup( udg_TempGroup2 )
-

Custom script: call DestroyGroup( udg_TempGroup1 )
Also, move the Houses to the correct Unit Group when a Dragon enters the map or dies:
-
Events
-

Unit - A unit Enters playable map area
-

Unit - A unit Dies
-
Conditions
-

(Unit-type of (Triggering unit)) Equal to Baby Dragon
-
Actions
-

Set TempGroup1 = (Units owned by (Owner of (Triggering unit)) matching (Unit-type of (Matching unit) Equal to Big Dragon) and (Matching unit) is Alive Equal to True)
-

Set TempGroup2 = (Units owned by (Owner of (Triggering unit)) matching (Unit-type of (Matching unit) Equal to Baby Dragon) and (Matching unit) is Alive Equal to True)
-

Set TempGroup3 = (Units owned by (Owner of (Triggering unit)) matching (Level of House Classification for (Matching unit) Equal to 1)
-

Set BabyDragonCount = (Number of units in TempGroup1)
-

Set BigDragonCount = (Number of units in TempGroup2)
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



(BabyDragonCount Equal to 0)
-



(BigDragonCount Equal to 0)
-


Then - Actions
-



Unit Group - Remove all units of TempGroup3 from House_Baby_Group.
-


Else - Actions
-



If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




If - Conditions
-





(BigDragonCount Equal to 0)
-




Then - Actions
-





Unit Group - Add all units of TempGroup3 to House_Baby_Group.
-




Else - Actions
-

Custom script: call DestroyGroup( udg_TempGroup1 )
-

Custom script: call DestroyGroup( udg_TempGroup2 )
-

Custom script: call DestroyGroup( udg_TempGroup3 )
-
Events
-

Unit - A unit Enters playable map area
-

Unit - A unit Dies
-
Conditions
-

(Unit-type of (Triggering unit)) Equal to Big Dragon
-
Actions
-

Set TempGroup1 = (Units owned by (Owner of (Triggering unit)) matching (Unit-type of (Matching unit) Equal to Big Dragon) and (Matching unit) is Alive Equal to True)
-

Set TempGroup2 = (Units owned by (Owner of (Triggering unit)) matching (Level of House Classification for (Matching unit) Equal to 1)
-

Set BigDragonCount = (Number of units in TempGroup2)
-

Unit Group - Remove all units of TempGroup2 from House_Baby_Group.
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



(BigDragonCount Greater than 0)
-


Then - Actions
-



Unit Group - Add all units of TempGroup2 to House_Big_Group.
-


Else - Actions
-

Custom script: call DestroyGroup( udg_TempGroup1 )
-

Custom script: call DestroyGroup( udg_TempGroup2 )
When a House dies make sure to remove it from the Unit Groups so it stops generating lumber:
-
Events
-

Unit - A unit Dies
-
Conditions
-

(Level of House Classification for (Triggering unit)) Equal to 1
-
Actions
-

Set TempGroup1 = (Units owned by (Owner of (Triggering unit)) matching (Level of House Classification for (Matching unit) Equal to 1)
-

Unit Group - Remove (Triggering unit) from House_Baby_Group.
-

Unit Group - Remove (Triggering unit) from House_Big_Group.
-

Custom script: call DestroyGroup( udg_TempGroup1 )
House Classification is a hidden ability based on Storm Hammers. Give it to all of your House units in the Object Editor. To hide an ability, set it's Art - Button Positions to 0, -11. (Hold shift while opening a field to enable negative values)
Variables:
TempGroup1 = Unit Group
TempGroup2 = Unit Group
TempGroup3 = Unit Group
House_Baby_Group = Unit Group
House_Big_Group = Unit Group
BabyDragonCount = Integer
BigDragonCount = Integer
PlayerGroup = Player Group
Note that you can optimize these triggers
a lot, this is just the lazy way of doing it. I highly recommend using
unique variables for everything, I happened to use these "Temp" variables because I was in a rush, but when working with the "A unit Dies" event you should try to use new variables. To clarify, all of these triggers can still share the same variables, just make sure outside triggers do not.