- Joined
- Jul 9, 2008
- Messages
- 1,184
I need a function that will convert an Ability to an AbilID
Currently trying to create a function that will return all the remaining cooldowns of a unit's abilities whenever that unit starts the effect of a spell. So far I am able to get the names of all the abilities, but need to convert them to AbilId's to get their remaining cooldown amounts. Any help?
Ideally I need to be able to do something like
But sadly have not found anything in the common.j or blizzard.j like these
Currently trying to create a function that will return all the remaining cooldowns of a unit's abilities whenever that unit starts the effect of a spell. So far I am able to get the names of all the abilities, but need to convert them to AbilId's to get their remaining cooldown amounts. Any help?
JASS:
function AllRemainingCooldowns takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 11
call DisplayTextToForce( GetPlayersAll(), "t " + BlzGetAbilityStringLevelField( BlzGetUnitAbilityByIndex( GetTriggerUnit(), i), ABILITY_SLF_TOOLTIP_NORMAL, 0) )
call DisplayTextToForce( GetPlayersAll(), "c " + BlzGetUnitAbilityCooldownRemaining( GetTriggerUnit(), BlzGetUnitAbilityByIndex( GetTriggerUnit(), i) ) )
set i = i+1
endloop
endfunction
Ideally I need to be able to do something like
JASS:
BlzGetUnitAbilityByIndex( GetTriggerUnit(), i).AbilityId
//OR call something like this
call GetAbilityId( ability )
But sadly have not found anything in the common.j or blizzard.j like these
Last edited: