Adding to Income

Alex

New Member
Reaction score
0
I want it so that by Building/Obtaining a certain building you add to the income which you get every 60 seconds.
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
This adds 1337 gold for each alter of kings the player has:
Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set tempunitgroup = (Units owned by (Player((Integer A))) matching (((Matching unit) is A structure) Equal to (==) True))
          • Unit Group - Pick every unit in tempunitgroup and do (Actions)
            • Loop - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to (==) Altar of Kings
                • Then - Actions
                  • Player - Add 1337 to (Player((Integer A))) Current gold
                • Else - Actions
          • Custom script: call DestroyGroup(udg_tempunitgroup)


If you have more than one kind of building that adds income, just add to unit group. make an if/then/else for each kind of building, and set the gold acquired for each kind :x

Example:

This alteration of the previous trigger adds both 1337 gold for each alter of kings a player has, and also adds over 9000 gold for each scout tower they have

Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set tempunitgroup = (Units owned by (Player((Integer A))) matching (((Matching unit) is A structure) Equal to (==) True))
          • Unit Group - Pick every unit in tempunitgroup and do (Actions)
            • Loop - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to (==) Altar of Kings
                • Then - Actions
                  • Player - Add 1337 to (Player((Integer A))) Current gold
                • Else - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to (==) Scout Tower
                • Then - Actions
                  • Player - Add 9001 to (Player((Integer A))) Current gold
                • Else - Actions
          • Custom script: call DestroyGroup(udg_tempunitgroup)
 

BlackRabbit

New Member
Reaction score
3
Awesome assistance find on my part. Great trigger, Sui-cookie. Will bookmark if I ever decide to implement this!

+rep
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top