• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your 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