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

[General] Upgrading a unit multiple times does not work as expected

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,669
I have a base building which can be upgraded to:
  • Tower
  • Trebuchet
The trebuchet can be upgraded to a trebuchet with oil or the tower.
The tower can be upgraded to the trebuchet.

I have multiple issues:
  • When the trebuchet is upgraded to a tower the tower can only be upgrade to a tower again.
  • When the trebuchet is upgraded to a trebuchet with oil it stays the trebuchet.
Am I doing something wrong? Do I have to replace the unit with a chaos ability or something?
 
Level 12
Joined
Mar 13, 2020
Messages
421
I have a base building which can be upgraded to:
  • Tower
  • Trebuchet
The trebuchet can be upgraded to a trebuchet with oil or the tower.
The tower can be upgraded to the trebuchet.

I have multiple issues:
  • When the trebuchet is upgraded to a tower the tower can only be upgrade to a tower again.
  • When the trebuchet is upgraded to a trebuchet with oil it stays the trebuchet.
Am I doing something wrong? Do I have to replace the unit with a chaos ability or something?

do you use triggers or the normal way?
Are you sure you checked everything?
Towers and Upgrades are not my Thing never used any of it.... Sorry for that xD
If you have no auras/buffs/or anything that gains stats for the unit you can use the chaos ability and test around but watch out because it absorbs the stats of the Unit before.. and i think it’s to complicated to save so much things in variables to use the chaos ability in a TD...
So you could try to add the Ability(Upgrade) you use to the Tower after upgrading it.. try it

Trebutchet -> Tower (Add Ability per Trigger Trebutchet Upgrade)
 
Level 25
Joined
Feb 2, 2006
Messages
1,669
The problem with the chaos ability is that I would have to detect which upgrade is started. I can only use it if I use researches instead of upgrades since my upgrades should cost gold. I will try that.

edit:
Training/selling a unit is better than using a research. A research must be made available again for the player and can not be researched concurrently. I might sell a unit instead.

edit2:
My issue with selling a unit is that the unit selected might be one of the allied player (the building's owner) and the gold however is taken from my player. Is there any selection ability which takes the money from the player himself only?
 
Last edited:
Level 12
Joined
Mar 13, 2020
Messages
421
The problem with the chaos ability is that I would have to detect which upgrade is started. I can only use it if I use researches instead of upgrades since my upgrades should cost gold. I will try that.

edit:
Training/selling a unit is better than using a research. A research must be made available again for the player and can not be researched concurrently. I might sell a unit instead.

edit2:
My issue with selling a unit is that the unit selected might be one of the allied player (the building's owner) and the gold however is taken from my player. Is there any selection ability which takes the money from the player himself only?

can you post your trigger ?
 
Level 25
Joined
Feb 2, 2006
Messages
1,669
  • Sell Gondor Tower
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Gondor Tower
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Selling unit)) Equal to Building Position
        • Then - Actions
          • Unit - Add From Building Position to Gondor Tower to (Selling unit)
          • Unit - Remove From Building Position to Gondor Tower from (Selling unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Selling unit)) Equal to Trebuchet
        • Then - Actions
          • Unit - Add From Trebuchet to Gondor Tower to (Selling unit)
          • Unit - Remove From Trebuchet to Gondor Tower from (Selling unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Selling unit)) Equal to Trebuchet with Burning Oil
        • Then - Actions
          • Unit - Add From Trebuchet with Burning Oil to Gondor Tower to (Selling unit)
          • Unit - Remove From Trebuchet with Burning Oil to Gondor Tower from (Selling unit)
        • Else - Actions
          • Do nothing
      • Unit - Remove (Sold unit) from the game
      • Neutral Building - Remove Gondor Tower from (Selling unit)
      • Neutral Building - Add Trebuchet to (Selling unit) with 1 in stock and a max stock of 1
Changing the sold units or adding new selled units does not work. The unit name stays sometimes the same.
My abilities "From Trebuchet to Gondor Tower" etc. are based on "Druid of the Claw Bear Form" and I use as normal unit the unit it should be transformed into and as alternate unit the current unit type.
However, not all transformations work?
 
Level 12
Joined
Mar 13, 2020
Messages
421
  • Sell Gondor Tower
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Gondor Tower
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Selling unit)) Equal to Building Position
        • Then - Actions
          • Unit - Add From Building Position to Gondor Tower to (Selling unit)
          • Unit - Remove From Building Position to Gondor Tower from (Selling unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Selling unit)) Equal to Trebuchet
        • Then - Actions
          • Unit - Add From Trebuchet to Gondor Tower to (Selling unit)
          • Unit - Remove From Trebuchet to Gondor Tower from (Selling unit)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Selling unit)) Equal to Trebuchet with Burning Oil
        • Then - Actions
          • Unit - Add From Trebuchet with Burning Oil to Gondor Tower to (Selling unit)
          • Unit - Remove From Trebuchet with Burning Oil to Gondor Tower from (Selling unit)
        • Else - Actions
          • Do nothing
      • Unit - Remove (Sold unit) from the game
      • Neutral Building - Remove Gondor Tower from (Selling unit)
      • Neutral Building - Add Trebuchet to (Selling unit) with 1 in stock and a max stock of 1
Changing the sold units or adding new selled units does not work. The unit name stays sometimes the same.
My abilities "From Trebuchet to Gondor Tower" etc. are based on "Druid of the Claw Bear Form" and I use as normal unit the unit it should be transformed into and as alternate unit the current unit type.
However, not all transformations work?

ok I will look tomorrow for an working Trigger for you and test a bit around...
It should not be that hard...
 
Status
Not open for further replies.
Top