• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Spell] Melee to Range and Vice Versa

Status
Not open for further replies.
Level 6
Joined
Jul 23, 2018
Messages
243
I made 2 heroes, they're the same hero but one of them is range and another is melee. When he casts an ability based on Destroyer Form, he turns into melee or range depends on his weapon type. The problem is when hero switches from one weapon type to another, he loses his mana upon casting the ability although it has no mana cost. He only has 100 mana after casting the ability.
 
Level 4
Joined
Sep 2, 2016
Messages
48
Trigger it.
When the unit begins to change save the mana to a variable.
When it finishes set it's mana to the value in the variable.
If there is going to be more heroes of this kind, then make a separate variable for each of them. If only per player an array of 12 would be enough.
You access it by Variable[NumberOfPlayer(OwnerOfUnit(TriggeringUnit))].

Or try to remove ~Requires cost~ in [DataB1] field in the ability. I think it makes the unit to lose mana.

Or base the ability on something else. Bear Form [Abrf] for example.
 
Last edited:
Status
Not open for further replies.
Top