• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to make buildings periodically give gold

Status
Not open for further replies.
Level 1
Joined
Jan 30, 2007
Messages
152
pl dont give ideas as i have ideas i just dont know how to implement them.
I want a specific building to periodically give gold or lumber to the player that owns it; without having another until "mine" it so to speak
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
  • Trigger
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Player - Add 50 to (Owner of (Triggering unit)) Current gold
      • Player - Add 50 to (Owner of (Triggering unit)) Current lumber
Fearly easy :)
All you do is replace (Triggering unit) with your building.

~Operator
 
Level 7
Joined
Jul 14, 2006
Messages
292
And how please can you do it operator? It doesn't work that way.
This should rather do!

  • Farm gives gold
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • Set BuildingGoldGroup = (Units of type Farm)
      • Unit Group - Pick every unit in BuildingGoldGroup and do (Player - Add 10 to (Owner of (Picked unit)) Current gold)
      • Custom script: call DestroyGroup(udg_BuildingGoldGroup)
You only need 1 variable and it's this one:
Unit Group - BuildingGoldGroup

(You can choose another name, but you'll have to change the custom script to make it fit with the name you set.)

That should gives 10 gold per farm controlled by the player.

If you don't understand or if you want a better trigger that do more things, please reply and I'll try to answer the best I can.
(^.^)d
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
And how please can you do it operator? It doesn't work that way.
This should rather do!

  • Farm gives gold
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • Set BuildingGoldGroup = (Units of type Farm)
      • Unit Group - Pick every unit in BuildingGoldGroup and do (Player - Add 10 to (Owner of (Picked unit)) Current gold)
      • Custom script: call DestroyGroup(udg_BuildingGoldGroup)
You only need 1 variable and it's this one:
Unit Group - BuildingGoldGroup

(You can choose another name, but you'll have to change the custom script to make it fit with the name you set.)

That should gives 10 gold per farm controlled by the player.

If you don't understand or if you want a better trigger that do more things, please reply and I'll try to answer the best I can.
(^.^)d

He said ''specific building'' that means one building.
 
Status
Not open for further replies.
Top