Okay.
You need some array variables then.
Gold_Unit_Group_Var[x] = Needed to store the buildings
Gold_Integer_Var[x] = Needed to count how many buildings per player there is in the map
*x is max number of players in the map
Trigger 1:
Event - A building finishes constructing
Conditions - Building finished being constructed Equal to Gold Building
Actions -
Set Gold_Integer_Var[Number of (owner of triggering unit)] = (Gold_Integer_Var[Number of (owner of triggering unit)] + 1)
Add triggering unit to Gold_Unit_Group_Var[Number of (owner of triggering unit)]
Trigger 2:
Event - A unit dies
Conditions - Unit type of Triggering unit Equal to Gold Building
Actions -
Set Gold_Integer_Var[Number of (owner of triggering unit)] = (Gold_Integer_Var[Number of (owner of triggering unit)] - 1)
Remove triggering unit to Gold_Unit_Group_Var[Number of (owner of triggering unit)]
Trigger 3:
Event - Every X seconds pf game time
Conditions -
Actions -
For each Integer A 1 to (max number of players) do actions
loop -
Pick every unit in Gold_Unit_Group_Var[Integer A]
loop -
Create a Floating Text above picked unit displaying the text (amount of gold given)
Disable permanence from Last created Floating text
Set lifespan of Last created Floating text to X seconds
Add to Owner of picked unit's gold X
Note:
Actually you don't need the integer variable. But if you want to display some form of calculation in the floating text it's good to have.
Hope it makes sense.
Edit:
ARGH! Screw you aple