• 🏆 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!

How to upgrade an unit to a new unit

Status
Not open for further replies.
Level 3
Joined
Apr 12, 2015
Messages
19
Hey guys
I have a new problem and I hope you can help me with this again :as:
I want to make an upgrade that change an unit into another.

For example:
I can sold a footman at the Barracks. Now if I will upgrade "Knight Upgrade" I can sod the units Knight in the Barracks now.
I allready find a thread about that:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/creating-mass-unit-upgrade-like-orcs-berserker-upgrade-143755/

It also works for me but only with trained units not with sold
Maybe there is a way with triggers? I already tried it but I cant find an Action trigger to add/remove an unit from a structure
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Something like this should work I think.
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Current research level of Black Gunpowder for (Owner of (Triggering unit))) Greater than 0
    • Actions
      • Unit - Replace (Triggering unit) with a Sorceress using The new unit's default life and mana
 
Level 23
Joined
Apr 12, 2014
Messages
1,846
[trigger=Untitled Trigger 001] Trigger
Events:
Unit - A unit owned by Player 1 (Red) Finishes an upgrade
Conditions:
(Researched tech-type) Equal to Knight Upgrade
Actions:
Player - Make Footman Unavailable for training/construction by Player 1 (Red)
Player - Make Knight Available for training/construction by Player 1 (Red)[/trigger]

Maybe something like this would do, just make the knight unavailable in map initialization.
 
Level 3
Joined
Apr 12, 2015
Messages
19
  • Trigger
  • Events:
  • Unit - A unit owned by Player 1 (Red) Finishes an upgrade
  • Conditions:
  • (Researched tech-type) Equal to Knight Upgrade
  • Actions:
  • Player - Make Footman Unavailable for training/construction by Player 1 (Red)
  • Player - Make Knight Available for training/construction by Player 1 (Red)
Maybe something like this would do, just make the knight unavailable in map initialization
I tried it but it is the same porblem like in the link of the thread I write down. It only works for trained unit but not for sold units(units that are summon at once and they are with stacks)

Something like this should work I think.
  • Untitled Trigger 001
  • Events
  • Unit - A unit enters (Playable map area)
  • Conditions
  • (Current research level of Black Gunpowder for (Owner of (Triggering unit))) Greater than 0
  • Actions
  • Unit - Replace (Triggering unit) with a Sorceress using The new unit's default life and mana

With this method it works with sold units but the Icon and desciption of this unit will be the old one. But they shall be changed too

Is there no trigger to change the sold units of a building? A trigger like "add/Remove selling unit of unit"
 
Last edited:
Level 21
Joined
Nov 4, 2013
Messages
2,017
Yes there is one. Open the Neutral Bulding category in Actions and you'll stumble across a good command called Remove Unit-Type (From Marketplace). Ignore that thing written in the brackets. You will just have to add the "Sell Unit" ability to the selling structure and it's done.
There's also an Add Unit-Type (From Marketplace) command so don't worry :)
 
Level 3
Joined
Apr 12, 2015
Messages
19
Yes there is one. Open the Neutral Bulding category in Actions and you'll stumble across a good command called Remove Unit-Type (From Marketplace). Ignore that thing written in the brackets. You will just have to add the "Sell Unit" ability to the selling structure and it's done.
There's also an Add Unit-Type (From Marketplace) command so don't worry :)
Thanks for your answer. I really thought it would work but it doesn't work =(
The first unit can still be sold and the second doesn't.
Here is my Trigger:
  • Type Normal
    • Events
      • Unit - Upgrade Center 0036 <gen> Finishes research
    • Conditions
      • (Researched tech-type) Equal to Fel Beast
    • Actions
      • Neutral Building - Remove Mur'gul Level 1 from Evil Spawner 0035 <gen>
      • Neutral Building - Add Fel Beast Level 2 to Evil Spawner 0035 <gen> with 1 in stock and a max stock of 15
Maybe I have to change the building as neutral? I tried to change it in the Oject Editor the "Evil Spawner" in line "Stats - Unit Classification" and I deselect all and only select "Neutral" but the trigger still doesn't work

Edited: Sorry I have forgotten to add the ability "Sell Unit" to the structure. Now the second unit is added to the structure after researching but the first unit isn't removed

Second Edited: ok now it works =D
It's important that you have added that unit with a trigger(not in the object Editor) that you want to remove. So I added this trigger:

  • Units sells first
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Neutral Building - Add Mur'gul Level 1 to Evil Spawner 0035 <gen> with 15 in stock and a max stock of 15
Thanks guys for you help =)
 
Last edited:

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,870
Trigger free with many QoL things, such as the unites retaining their place in the unit groups

Simply use the "Chaos" ability from the orc spells section and lock it behind the upgrade.
Chaos is the worst ability to choose from, because it is prone to bugs. berserk or bear form is better.

This is only proof that time is relative, some people move too fast and do so many things at same time that they forgot no time has passed.
 
Status
Not open for further replies.
Top