• 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.

[Solved] Help creating a trigger...

Status
Not open for further replies.
Level 11
Joined
Jul 20, 2010
Messages
869
So i kinda need help creating a trigger and i think this is the right forum to post this,if not then i am sorry :(

So,the problem i have is that i want to create a trigger that will give for example 3 gold every 10 seconds for every farm you have for example,like in Tree Tag,and i don't know how to do it :(
I need it for a tag map i am currently working so any help would be greatly appreciated :p
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
  • Trigger
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_Group = (Units owned by (Picked player) of type Farm)
          • Set int = (Number of units in Temp_Unit_Group)
          • Player - Add (int x 3) to (Picked player) Current gold
          • Custom script: call DestroyGroup(udg_Temp_Unit_Group)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Trigger
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_Group = (Units owned by (Picked player) of type Farm)
          • Set int = (Number of units in Temp_Unit_Group)
          • Player - Add (int x 3) to (Picked player) Current gold
          • Custom script: call DestroyGroup(udg_Temp_Unit_Group)

Filter out dead units and using bj_wantDestroyGroup is better than using a variable in this case.
 
Status
Not open for further replies.
Top