• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Giving ability to morphed units

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
Hi i have an ability that can give another passive ability to unit for duration, but the issue is that if u give it to the unit that morphed, then after morph ends the orginal unit doesnt have this skill anymore. Any idea how to fix it??
 
JASS:
UnitMakeAbilityPermanent     takes unit whichUnit, boolean permanent, integer abilityId returns boolean
When you want toadd your desired ability you make
JASS:
call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'AHbz')
Note that it doesn't need to be the triggering unit. You can simply create a unit variable like "MyUnit", set it to your desired unit and then use "udg_MyUnit" inside the custom script. 'AHbz' is the raw code of blizzard ability, change it to your custom ability by toggling CTRL + D and see the raw code along with the ability name.
 
Status
Not open for further replies.
Back
Top