• 🏆 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!

[Trigger] GUI Income Trigger / Timer Correlation

Status
Not open for further replies.
Level 2
Joined
Mar 15, 2011
Messages
7
So these are my triggers during Initialization:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set IncomeUNIT_TYPE[1] = Human House
      • Set IncomeMONEY[1] = 10
      • Set IncomeUNIT_TYPE[2] = Human House (2)
      • Set IncomeMONEY[2] = 20
      • Set IncomeUNIT_TYPE[3] = Human House (3)
      • Set IncomeMONEY[3] = 40
      • Set IncomeUNIT_TYPE[4] = Human House (4)
      • Set IncomeMONEY[4] = 80
      • Set IncomeUNIT_TYPE[5] = Elf House
      • Set IncomeMONEY[5] = 10
      • Set IncomeUNIT_TYPE[6] = Elf House (2)
      • Set IncomeMONEY[6] = 20
      • Set IncomeUNIT_TYPE[7] = Elf House (3)
      • Set IncomeMONEY[7] = 40
      • Set IncomeUNIT_TYPE[8] = Elf House (4)
      • Set IncomeMONEY[8] = 80
      • Set IncomeUNIT_TYPE[9] = Flesh Market
      • Set IncomeMONEY[9] = 10
      • Set IncomeUNIT_TYPE[10] = Flesh Market (2)
      • Set IncomeMONEY[10] = 20
      • Set IncomeUNIT_TYPE[11] = Flesh Market (3)
      • Set IncomeMONEY[11] = 40
      • Set IncomeUNIT_TYPE[12] = Flesh Market (4)
      • Set IncomeMONEY[12] = 80
      • Set IncomeUNIT_TYPE[13] = Gnoll House
      • Set IncomeMONEY[13] = 10
      • Set IncomeUNIT_TYPE[14] = Gnoll House (2)
      • Set IncomeMONEY[14] = 20
      • Set IncomeUNIT_TYPE[15] = Gnoll House (3)
      • Set IncomeMONEY[15] = 40
      • Set IncomeUNIT_TYPE[16] = Gnoll House (4)
      • Set IncomeMONEY[16] = 80
      • Set IncomeUNIT_TYPE[17] = Naga House
      • Set IncomeMONEY[17] = 10
      • Set IncomeUNIT_TYPE[18] = Naga House(2)
      • Set IncomeMONEY[18] = 20
      • Set IncomeUNIT_TYPE[19] = Naga House(3)
      • Set IncomeMONEY[19] = 40
      • Set IncomeUNIT_TYPE[20] = Naga House(4)
      • Set IncomeMONEY[20] = 80
      • Set IncomeUNIT_TYPE[21] = Orc House
      • Set IncomeMONEY[21] = 10
      • Set IncomeUNIT_TYPE[22] = Orc House (2)
      • Set IncomeMONEY[22] = 20
      • Set IncomeUNIT_TYPE[23] = Orc House (3)
      • Set IncomeMONEY[23] = 40
      • Set IncomeUNIT_TYPE[24] = Orc House (4)
      • Set IncomeMONEY[24] = 80
      • Set IncomeUNIT_TYPE[25] = Troll House
      • Set IncomeMONEY[25] = 10
      • Set IncomeUNIT_TYPE[26] = Troll House (2)
      • Set IncomeMONEY[26] = 20
      • Set IncomeUNIT_TYPE[27] = Troll House (3)
      • Set IncomeMONEY[27] = 40
      • Set IncomeUNIT_TYPE[28] = Troll House (4)
      • Set IncomeMONEY[28] = 80
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 1500
          • Player - Set (Picked player) Current lumber to 2
          • Player - Set (Picked player) Food cap to 35
Then the income timer:
  • Initialization 2
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start IncomeTime as a Repeating timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Income Timer
      • Countdown Timer - Show (Last created timer window)
And finally the income:
  • Income
    • Events
      • Time - IncomeTime expires
    • Conditions
    • Actions
      • For each (Integer B) from 1 to 28, do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units of type IncomeUNIT_TYPE[(Integer B)]) and do (Actions)
            • Loop - Actions
              • Player - Add IncomeMONEY[(Integer B)] to (Picked player) Current gold
The multibaord income timer is working, shows looping every 30seconds, but the income for owning how ever many buildings specified by the Unit_Type variable isnt working. Any clues to where I went wrong?
 
Status
Not open for further replies.
Top