• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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 73
Joined
Aug 10, 2018
Messages
7,871
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