- Joined
- Feb 6, 2008
- Messages
- 166
How do you change a unit's gold and lumber cost with triggers? Here is what I would like to accomplish:
In normal ladder games, the first hero costs no gold or lumber. I would like to set all of the heroes' prices to 0 gold and 0 lumber at map initialization. Then, I use "A unit finishes training a unit" with actions set to "For each integer from 1 to 8" and "If-Then-Else" with "Or Conditions" checking that the unit trained was a hero and that the unit trained belonged to player [integer 1-8]. The Then list would include setting the gold and lumber cost of all the heroes in the game for said player to the normal cost.
Confused? Sure. In short, I want to set the cost of all heroes to 0 gold and lumber at map initialization, and then set them all to normal cost when the player has trained their first hero.
Worst case, I can just double-up all the heroes, and use the same fix I did here:
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/berserk-upgrade-help-156881/
... by making all the heroes free, and then replacing all the free heroes with... "un-free" ones once the first one has been trained.
In normal ladder games, the first hero costs no gold or lumber. I would like to set all of the heroes' prices to 0 gold and 0 lumber at map initialization. Then, I use "A unit finishes training a unit" with actions set to "For each integer from 1 to 8" and "If-Then-Else" with "Or Conditions" checking that the unit trained was a hero and that the unit trained belonged to player [integer 1-8]. The Then list would include setting the gold and lumber cost of all the heroes in the game for said player to the normal cost.
Confused? Sure. In short, I want to set the cost of all heroes to 0 gold and lumber at map initialization, and then set them all to normal cost when the player has trained their first hero.
Worst case, I can just double-up all the heroes, and use the same fix I did here:
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/berserk-upgrade-help-156881/
... by making all the heroes free, and then replacing all the free heroes with... "un-free" ones once the first one has been trained.
Last edited: