Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Hi folks, I'm currently making a map that needs income system. I don't want it in the spells sections, but I want it simple. I will bring the ones who helped me making the income system in the credits.
I've made some basic income trigger for you. These work for all 12 players (I don't know how much players your map has) and increases their income every 2 minutes, with income being given out every 30 seconds. If you want to make a specific event for the increase of income just change the event of the more income trigger to E.G. 'Unit Dies' and checking if the unit is the 'income unit', than increasing the income. Anyway, here are the triggers:
Init
Events
Map initialization
Conditions
Actions
For each (Integer A) from 1 to 12, do (Set Income[(Integer A)] = 100)
Income
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Player - Add Income[(Integer A)] to (Player((Integer A))) Current gold
Game - Display to (Player group((Player((Integer A))))) the text: (Your income is + (String(Income[(Integer A)])))
More Income
Events
Time - Every 120.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Set Income[(Integer A)] = (Income[(Integer A)] + 100))
Figured. I really need to stop making triggers before the evening, I always forget simple stuff like that.
@OP You can indeed use a Temp Integer or Integer A/B, I just feel like Integer A is easier to understand for new people and the only difference is efficiency and speed, but that will 90% of the time be of no issue whatsoever.
For the leak, change the income trigger to:
Income
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Set TempPlayerGroup = (Player group((Player((Integer A)))))
Game - Display to TempPlayerGroup the text: (Your income is + (String(Income[(Integer A)])))
Player - Add Income[(Integer A)] to (Player((Integer A))) Current gold
Figured. I really need to stop making triggers before the evening, I always forget simple stuff like that.
@OP You can indeed use a Temp Integer or Integer A/B, I just feel like Integer A is easier to understand for new people and the only difference is efficiency and speed, but that will 90% of the time be of no issue whatsoever.
For the leak, change the income trigger to:
Income
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Set TempPlayerGroup = (Player group((Player((Integer A)))))
Game - Display to TempPlayerGroup the text: (Your income is + (String(Income[(Integer A)])))
Player - Add Income[(Integer A)] to (Player((Integer A))) Current gold
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.