• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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,240
  • 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