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

unit resets mana after being upgraded

Status
Not open for further replies.
Level 4
Joined
Oct 2, 2015
Messages
74
I have a building in my map that has an upgrade ability like the troll berserker's one.
when it upgrades it's mana resets.
is there any way to prevent that?
i also have a unit with that upgrade ability but this one's mana doesn't reset so i know that it's possible.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,564
Compare the two unit's Mana settings in the Object Editor, maybe there's something different between them that would be the cause.

If you can't fix it through the Object Editor then maybe a trigger can be used.

So you would catch when your building upgrades, store it's mana BEFORE the change occurs, and set it to this value AFTER the change occurs. I'm not sure if there's a window of time that will allow this when using the upgrade Events, so the solution may not be as simple.
 
Last edited:
Status
Not open for further replies.
Top