• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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
 
  • 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)
 
  • 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.
Back
Top