• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

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:

Uncle

Warcraft Moderator
Level 58
Joined
Aug 10, 2018
Messages
5,839
This should do it:
  • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'A04S')
 
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