• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problem with income

Status
Not open for further replies.
Level 2
Joined
Jun 5, 2013
Messages
30
Im making a map, and this map is like build your city and destroy your enemies, and to get gold you need to get income, well
In my map there are 4 income buildings , and the trigger to get them is very simple,
-Unit - A unit owned by player 1 finishes a building
- Building = Shop
-Set income = +10 (and the market 20)
ok, but the problem is: To get to the next building you need to upgrade the shop to the market (his upgrade) and the trigger says when a unit finishes a building , not when you upgrade it, so in the game, after upgrade the shop ,the initial income is 0 instead of 20
Anyone know to solve this bug? :goblin_cry:
 
Level 2
Joined
Jun 5, 2013
Messages
30
Make a trigger that picks up the unit that makes income.. then add income to the owner of picked unit for every period of time ^_^

The problem isnt that, when i upgrade from shop to market the income may be 20 but the trigger dont count the upgrade of that building as a constructed unit, so in game , when you upgrade the trigger dosent count it.
 
Level 2
Joined
Jun 5, 2013
Messages
30
  • Set
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set income = ((income + 50.00) + 0.00)
  • Shop
    • Events
      • Unit - A unit owned by Player 1 (Red) Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Shop
    • Actions
      • Set income = (income + 10.00)
  • Market
    • Events
      • Unit - A unit owned by Player 1 (Red) Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Market
    • Actions
      • Set income = (income + 20.00)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240

  • Untitled Trigger 123
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • Game - Display to Player Group - Player 1 (Red) for 30.00 seconds the text: (Name of (Triggering unit))

This triggers when a scout tower uprades to cannon tower for example. Triggering unit is then new unit, cannon tower in this case.
 
Level 2
Joined
Jun 5, 2013
Messages
30

  • Untitled Trigger 123
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • Game - Display to Player Group - Player 1 (Red) for 30.00 seconds the text: (Name of (Triggering unit))

This triggers when a scout tower uprades to cannon tower for example. Triggering unit is then new unit, cannon tower in this case.
But what i need isnt the generic unif event , is a unit owned by a player.
 
Status
Not open for further replies.
Top