• 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] Adding and removing abilities question.

Status
Not open for further replies.
Level 13
Joined
May 10, 2009
Messages
868
What do you mean? I couldn't understand you, sorry. Perhaps this might be helpful:
JASS:
    native UnitAddAbility takes unit whichUnit, integer abilityId returns boolean
    native UnitRemoveAbility takes unit whichUnit, integer abilityId returns boolean
JASS:
    call UnitAddAbility( udg_MyUnit, 'A000' )
    call UnitRemoveAbility( udg_MyUnit, 'A000' )
  • Custom script: call UnitAddAbility( udg_MyUnit, 'A000' )
  • Custom script: call UnitRemoveAbility( udg_MyUnit, 'A000' )
I think you already know how to get/see Raw Code of abilities. (If not, then go to object editor and press: Ctrl + D)
 
Level 11
Joined
Nov 15, 2007
Messages
800
Since he said hero ability, I assume he wants this. Test map because this bug/feature is sortof hard to explain.
 

Attachments

  • abilitytest.w3x
    19.1 KB · Views: 82
Level 11
Joined
Nov 15, 2007
Messages
800
Thank you very much, you are always helpful. But a question : why in that map when removing the ability instantly it works but in my it doesn't?

You need to use the Engineering Upgrade ability to switch the removed ability with a disabled one. Otherwise removing a hero ability will just unlearn it and add it back to your learnable skills.
 
Status
Not open for further replies.
Top