Unit to apply this to.
Rawcode of ability.
isDisabled: true to disable (cannot click), false to enable ability.
isHidden: true to completely hide the icon, false to show icon. Icons are different for disabled/enabled abilities.
(1.32.10 confirmed) The game counts isDisabled and hideUI internally as integers(?) If you called 5 times "hideUI = true" to hide an icon then you'll need to multiple times "hideUI = false" to show it again. I do not exactly understand how it's counted. https://www.hiveworkshop.com/threads/blzunithideability-and-blzunitdisableability-dont-work.312477/
Enables/disables and hides/unhides an ability for a unit. A visible disabled ability is shown as deactivated, an invisible ability disappears from the grid.
-- assume u is Human Peasant, AHbu is ability for Human building. -- keep enabled, but hide icon BlzUnitDisableAbility(u, FourCC"AHbu", false, true)
- return type
- Source code
native BlzUnitDisableAbility takes unit whichUnit, integer abilId, boolean flag, boolean hideUI returns nothing