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

Need income system!

Status
Not open for further replies.
Level 2
Joined
Jun 18, 2008
Messages
8
Hello i need a income system which is easy to import for my map.
And if you help me with how to give + rep i will give + rep but right now im new to this foruming so i dont know how to give + rep.
The type i had in mind whas build 1 farm and you get 25 gold each 45 seconds kinda.
and then the same thing with lumber.
 
Last edited:
More informations would be nice. What produces the income, how is it given to the player, for which type of map is it planned?

To give rep, use the
reputation.gif
Button under the User Pictures. (No, do not even try to try it with my button, i have not helped you yet.)
 
Level 2
Joined
Jun 18, 2008
Messages
8
Sorry i went away for a few days. but now im back. but now i updated. the type i want is a builder type with income per buildings and building type. i want it to be easy to move and easy to modify the gold and the type of buildings.
 
There are a few different ways to do it, here is one. I can make you another

Sets up
  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- TRIGGER: I HAVE SET IT TO 5 GOLD & LUMBER FOR EACH LUMBER MILL/SECOND --------
      • -------- The interval of which income arrives --------
      • Set IncomeTime = 1.00
      • -------- Adds the event to the income trigger to gain income in intervals of IncomeTime --------
      • -------- As it uses the IncomeTime variable, it must be added from another trigger --------
      • Trigger - Add to Income <gen> the event (Time - Every IncomeTime seconds of game time)
      • -------- For each Integer, to set each variable array to the corresponding player's player number --------
      • -------- You can set it separately to make sure different players gain different income --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • -------- Setting the settings --------
              • Set IncomeGold[(Integer A)] = 5
              • Set IncomeLumber[(Integer A)] = 5
              • Set IncomeBuilding[(Integer A)] = Lumber Mill
            • Else - Actions
 
Level 2
Joined
Jun 18, 2008
Messages
8
Im gona need a bit more help on that as far as i see ill need variables right? could you please show me the variables and other triggers to? or tell me what to do? because im having a big problem figuring this out.
 
Last edited:
IncomeTime = a Real variable, basically a number with decimals.
IncomeGold[]= an array integer variable that stores different numbers for each player(using the arrays), determines the amount of gold you get
IncomeLumber[]= an array integer variable that stores different numbers for each player(using the arrays), determines the amount of lumber you get
IncomeBuilding[]= an array unit-type variable that stores different numbers for each player(using the arrays), determines what unit causes the periodic income

I forgot to add the second trigger in my last post! Sorry!
  • Income
    • Events
    • Conditions
    • Actions
      • -------- This trigger does not need an event. Its event is added from the 'Setup' trigger --------
      • -------- Checks every player --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • -------- Sets the units into one group to destroy the leak later on --------
          • Set TempGroup = (Units of type IncomeBuilding[(Integer A)])
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • -------- Adds your income for each Picked Unit --------
              • Player - Add IncomeGold[(Integer A)] to (Player((Integer A))) Current gold
              • Player - Add IncomeLumber[(Integer A)] to (Player((Integer A))) Current lumber
          • -------- Kills leaks --------
          • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 2
Joined
Jun 18, 2008
Messages
8
Okay thanks it worked thanks allot + rep given! now should i close this or let it be open or can i close it or how does it work now?
 
Status
Not open for further replies.
Top