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

[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