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

Keep An Ability After Metamorphosis

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2021
Messages
10
Hello all,

I am relatively new to WC3 world editor, but have learned a lot since I started working on a hero siege type map a couple months ago. I'm okay with the selectable commands, but not so much with the custom scripts. I am having trouble finding how to make an ability permanent so it doesn't get removed with a metamorphosis. So far, all I was able to find is
Custom Script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, GetSpellAbilityId())

1633215317384.png


Basically, I'm trying to add an attribute bonus to level 30 heroes, but I don't know the command to make it so the attribute bonus doesn't get removed. I believe GetSpellAbilityId is for "Starts the effect of an ability", so what would the command for a hero gains a level be or just the command to refer to the hero and ability in question in general? I'm sure this will be easy for you guys, but I literally do not know haha. The spell ID for Attribute Bonus is A04S and the Id for the Mind Flayer hero is N00H, I've also tried putting those in the parentheses for the unit/spell ability ID hoping that would work, but unfortunately it didn't.

Thank you!
 
Last edited:
Level 2
Joined
Oct 2, 2021
Messages
10
This should do it:
  • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'A04S')
Thank you so much! Works perfectly 👍 I could not figure it out for the life of me haha. Also your profile pic/name is awesome!
 
Status
Not open for further replies.
Top