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

Upgrading unit into another unit.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
So I set my unit as a building to do that upgrade "hack"

My unit upgrades into another unit. My 2nd unit has it's RGB 25, 25, 255 which makes him look blue. But when I upgrade my first unit into the 2nd unit the color doesn't change. Any idea how I can fix this?
 
Level 5
Joined
Jan 19, 2018
Messages
126
Not sure what you mean by upgrade hack, but if the color didn't change, that means the unit didn't change. Did you
make sure the unit actually has the upgrade ability?
 
Level 12
Joined
Dec 2, 2016
Messages
733
Not sure what you mean by upgrade hack, but if the color didn't change, that means the unit didn't change. Did you
make sure the unit actually has the upgrade ability?

If you make a unit a building, and then add another unit in the upgrades to. Then change the unit from a building back to a unit it will allow you to upgrade the unit into another unit.

And i know it's a new unit because I attached a special effect to an ability that the new unit possesss. I can see the effect which is a frost look. But the unit Doesn't change colour.
 
Level 5
Joined
Jan 19, 2018
Messages
126
?? Why are you doing it using buildings? Just make an upgrade and ability based off of the troll berserker upgrade/ability.
 
Level 12
Joined
Dec 2, 2016
Messages
733
Sorry for the delay, completely forgot about this post. Type -e in game for money command. Upgrade infernal into ranged, then into frost infernal. Then compare the two. The one premade in the game has a blue tint while the other doesn't even though it's the same model.
 

Attachments

  • Infernal test.w3x
    17.2 KB · Views: 38
Level 5
Joined
Jan 19, 2018
Messages
126
Maybe I'm missing something, but how are these units upgrading? I see no custom abilities, and they
are not structures so they don't have the upgrades to field, or custom triggers, so how did you do it?
I tested a regular building upgrading and it changes color as it should. So it seems that your "hack" may be causing the problem.
Tell me how do you do this "hack"?
 
Level 13
Joined
Jul 15, 2007
Messages
763
are not structures so they don't have the upgrades to field, or custom triggers, so how did you do it?

Just because the upgrade field cannot be seen does not mean it is not there. All data fields are present for a unit, but the vanilla editor only shows you the appropriate fields for that unit-type (that is: units, buildings and heroes). His trick is simply to convert a unit to a building, set its upgrade, and then set it back to a regular unit. A lot of external WE mods allow you to force-edit all possible fields for a unit (e.g. add hero abilities to a unit, convert a building directly to a hero and so forth, give a building strength gain hero per level). It is hardly surprising if a unit has a unexpected value for a user-disabled field turns out buggy.
 
Level 12
Joined
Dec 2, 2016
Messages
733
Maybe I'm missing something, but how are these units upgrading? I see no custom abilities, and they
are not structures so they don't have the upgrades to field, or custom triggers, so how did you do it?
I tested a regular building upgrading and it changes color as it should. So it seems that your "hack" may be causing the problem.
Tell me how do you do this "hack"?


Change is a building to true then add your next unit to upgrades too. Then change is a building back to false. It will keep the upgrade.
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
u can set the colouring tint with triggers

  • Animation - Change No unit's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
although u cant detect what the current tinting is unless u use some kind of system to keep track of it setting the current values into variables
 
Level 5
Joined
Jan 19, 2018
Messages
126
Here is a way to handle it with a simple trigger, it just replaces the bugged newly upgraded model with the correct model.
  • Infernal Upgrades
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • If ((Unit-type of (Triggering unit)) Equal to Ranged Infernal) then do (Unit - Replace (Triggering unit) with a Ranged Infernal using The old unit's relative life and mana) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Frost Infernal) then do (Unit - Replace (Triggering unit) with a Frost Infernal using The old unit's relative life and mana) else do (Do nothing)
Alternatively you could handle the bug like @millzy stated.
  • Infernal Upgrades millzy Style
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • If ((Unit-type of (Triggering unit)) Equal to Ranged Infernal) then do (Animation - Change (Triggering unit)'s vertex coloring to (20.00%, 80.00%, 100.00%) with 0.00% transparency) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Frost Infernal) then do (Animation - Change (Triggering unit)'s vertex coloring to (10.00%, 10.00%, 100.00%) with 0.00% transparency) else do (Do nothing)
The @millzy way may be better as your units wont be deselected when they upgrade into the newer unit.
But there it is, 2 ways to solve the issue.
 
Status
Not open for further replies.
Top