• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Keep An Ability After Metamorphosis

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2021
Messages
7
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
7
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