[General] Income System?

Level 12
Joined
Feb 19, 2009
Messages
579
I'm working on a map with no way to gather gold from mines or lumber from trees. The idea is, the player will receive income every sixty seconds. They can increase this income by capturing a number of "Control Towers" spread all around the map.

The problem is, I have no idea how to do this.

I want to know how to pull this off. How do I give the player a periodic income that's multiplied by the number of a certain type building the player owns?
 
Level 11
Joined
Dec 11, 2014
Messages
642
Whenever the timer expires add "income" to their gold. Income should be a variable. And whenever they capture the tower add some value to the Income variable. Timer should also have its own variable if you want it to have a window and not bee invisible (not sure about this)
 
Level 10
Joined
Apr 4, 2010
Messages
509
  • Income
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = Every unit in entire map matching Unit-Type of matching unit is equal to Control Tower Gold or Control Tower Wood
      • Pick every unit in TempGroup and do Actions
        • Loop
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Unit-Type of picked unit is equal to Control Tower Wood
            • Then - Actions
              • Add Wood Income to owner of picked unit
            • Else - Actions
              • Add Gold Income to owner of picked unit
      • Custom script: call DestroyGroup (udg_TempGroup)
 
Last edited:
Top