I made a trigger that makes it so that for every House that you build, you earn 100 gold every 30 seconds.
I also made a trigger that makes it so that for every House destroyed, it deducts your income by 100 gold. This makes it impossible to get any income when you have no Houses built nor do you suffer any sort of loss because of an income deficit. This system works flawlessly.
But I want to create an upgrade that gives you an additional 50 gold income for every House that you currently own and plan to build (from an initial 100 gold to 150 gold per house). Cue the Tax Reform upgrade which is supposed to do just that. But sadly I do not know how to implement this. The current attempt makes it so that once you researched Tax Reform, the formula of the income changes - adding a new Tax Reform value (which is 50).
This is flawed due to the fact that destroying all of your Houses somehow gives you an income of 100 gold still. Can anyone help me come out with a solution?
-
Red House
-
Events
-
Unit - A unit owned by Player 1 (Red) Finishes construction
-
-
Conditions
-
(Unit-type of (Constructed structure)) Equal to House
-
-
Actions
-
Set Red_Income = (Red_Income + Red_Tax_Constant)
-
-
-
Red Income
-
Events
-
Time - Every 30.00 seconds of game time
-
-
Conditions
-
Actions
-
Player - Add Red_Income to Player 1 (Red) Current gold
-
-
I also made a trigger that makes it so that for every House destroyed, it deducts your income by 100 gold. This makes it impossible to get any income when you have no Houses built nor do you suffer any sort of loss because of an income deficit. This system works flawlessly.
-
Red House Destroyed
-
Events
-
Unit - A unit owned by Player 1 (Red) Dies
-
-
Conditions
-
(Unit-type of (Dying unit)) Equal to House
-
-
Actions
-
Set Red_Income = (Red_Income - Red_Tax_Constant)
-
-
But I want to create an upgrade that gives you an additional 50 gold income for every House that you currently own and plan to build (from an initial 100 gold to 150 gold per house). Cue the Tax Reform upgrade which is supposed to do just that. But sadly I do not know how to implement this. The current attempt makes it so that once you researched Tax Reform, the formula of the income changes - adding a new Tax Reform value (which is 50).
-
Red Tax Reforms
-
Events
-
Unit - A unit owned by Player 1 (Red) Finishes research
-
-
Conditions
-
(Researched tech-type) Equal to Tax Reforms [Level - 1]
-
-
Actions
-
Set Red_Income = ((Red_Income + Tax_Reforms) + Red_Tax_Constant)
-
-
This is flawed due to the fact that destroying all of your Houses somehow gives you an income of 100 gold still. Can anyone help me come out with a solution?