• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Upgrade units with triggers

Status
Not open for further replies.
Level 7
Joined
Feb 23, 2020
Messages
253
Hello, i wonder if there is a very simple solution to upgrade units for a TD with lots of levels.

So instead of making 10, 20 etc. Units in the object editor, are there a simple way to only need 1 unit which upgrades through triggers instead?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
You can use Abilities, literal Upgrades, and functions that directly manipulate a Unit's stats:
  • Set Variable CurrentLevel = CurrentLevel + 1
  • Player - Set the current research level of Iron Forged Swords to CurrentLevel for Player 1 (Red)
You can find these under the Unit/Player categories in the Trigger Editor.
 
Level 7
Joined
Feb 23, 2020
Messages
253
Would this affect only the targeted unit, or would this affect all of the units of the same type?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
Would this affect only the targeted unit, or would this affect all of the units of the same type?
Upgrades are what you research from a building which takes resources/time. I'm sure you've played a ladder game before where you researched an Upgrade like Animal War Training from the Barracks which increased the Hit Points of your Knights/Gryphon Riders.

You can customize and create your own Upgrades inside of the Object Editor. Just remember that your Units will then need to be setup to USE these Upgrades which is done in the Object Editor as well. Each unit has an Upgrades Used field, I recommend looking at the Knight as this uses Animal War Training which shows you how to increase it's Hit Points.

When you research an Upgrade using the Action in my previous post it will skip the resource costs/time.
 
Status
Not open for further replies.
Top