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

The Techtree - Sold Units parameter does not work when improving a building

Level 2
Joined
Jul 16, 2023
Messages
5
I have a barracks level 1 I can exactly hire units through the parameter Techtree - Units Sold, as a shop robbers.
Made that it can be improved to a barracks with level 2 and added a new unit, but when improving the unit does not appear, but if this barracks separately put in the editor all normal. The unit as an example for the barracks - Barracks.
The editor is used official on the current version of Warcraft 3 Reforged.
How to solve this issue?
I attach screenshots:
1 screenshot - Barracks level 1

2 screenshot - I upgraded a level 1 barracks to level 2, the unit did not appear.

3 screenshot - I put a separate barracks of level 2 immediately in the game, the unit is available

Other parameter screenshots:
 
Level 20
Joined
Aug 29, 2012
Messages
827
I've tested and got the same issue as you do. I could work around the problem with a trigger like so:

  • Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Barracks Tier-2
    • Actions
      • Neutral Building - Add Cavalier to (Triggering unit) with 5 in stock and a max stock of 5
Your building just needs to have the "Sell Units" ability. I don't know if there's a way to make it work without triggers
 
Level 2
Joined
Jul 16, 2023
Messages
5
Too bad there's a bug like this.
That's weird, either I did something wrong or there's something missing in the trigger?
I'm a newbie, so I may ask dumb questions
1702057852687.png

I've tested and got the same issue as you do. I could work around the problem with a trigger like so:

  • Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Barracks Tier-2
    • Actions
      • Neutral Building - Add Cavalier to (Triggering unit) with 5 in stock and a max stock of 5
Your building just needs to have the "Sell Units" ability. I don't know if there's a way to make it work without triggers
 
Level 21
Joined
Dec 4, 2007
Messages
1,478
Maybe you can get away with replacing the former barracks with its tier 2 version after upgrading.
Event should be: Unit - A unit Finishes an upgrade
Action: Unit - Replace (Triggering unit) with a Footman using The old unit's life and mana
 
Top