Gold Variable

Status
Not open for further replies.
Level 4
Joined
Aug 30, 2008
Messages
82
I suck with variables.. How do I make it so a player gets 50 gold per Specific Building he has every 20 seconds.

sry for my noob question.

working on a WW3 type map.
 
try this

  • adding gold
    • events
      • time - every 20.00 seconds of game time
    • conditions
    • actions
      • unit group - pick every unit in (units owned by <your player> of type <your building>) and do (actions)
        • loop - actions
          • player - add 50 to <your player> current gold

thanks man!
 
you're welcome

but that trigger only work for one player, if you want to work for all player, try this:
  • Adding Gold All Player
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Unit_Group = (Units owned by (Picked player) of type <Your Building>)
          • Unit Group - Pick every unit in Unit_Group and do (Actions)
            • Loop - Actions
              • Player - Add 50 to (Picked player) Current gold
          • Custom script: call RemoveLocation(udg_Unit_Group)
Unit_Group is unit group variable.
this trigger is leakless
 
Various objects.

Hello there! I want to ask about similar thing- What if I want to have a GROUP of buildings giving income, not only one specific? I wanted to implement Aws/Risk-like system with Circles named after location (like Point: Glacial Falls or Point: Eastern Woods etc) I don't know how the trigger should look :(
 
Status
Not open for further replies.
Back
Top