• 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.

[Spell] Metamorphosis to change hero's spells?

Status
Not open for further replies.
Level 12
Joined
May 9, 2009
Messages
735
I am trying to make a transformation spell that changes the abilities of the hero but it's not working out. I have the alternative hero's spells working fine when I place him alone, but when the normal hero morphs into him he retains the normal hero's spells. Is there a simple way to make metamorphosis give alternative spells to the hero or do I have to do with it triggers?
 

EdgeOfChaos

E

EdgeOfChaos

Triggers are a simple way

Unit casts the ability:

local unit u2u = GetCastingUnit()
call UnitRemoveAbility('myabil1',u2u)
call UnitRemoveAbility('myabil2',u2u)
call UnitAddAbility('myabil3',u2u)
call UnitAddAbility('myabil4',u2u)
call PolledWait(30)
call UnitRemoveAbility('myabil3',u2u)
call UnitRemoveAbility('myabil4',u2u)
call UnitAddAbility('myabil1',u2u)
call UnitAddAbility('myabil2',u2u)
set u2u = null
 
Level 12
Joined
May 9, 2009
Messages
735
It's not as simple as that as that would only change the current spells of the hero. So when he morphs the spells he already unlocked are changed but he can still only pick the normal spells when he levels up resulting in both spells being available.

Is there a trigger to make the spells that are not yer learned change as well?
 

EdgeOfChaos

E

EdgeOfChaos

Couldn't you just add/remove hero abilities and they would behave that way? Then just set the level of the corresponding skill.

You could also use multiple units and Hide the original.
 
Status
Not open for further replies.
Top