🏆 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!
🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!
Hello, I know there is a trigger action that resets all ability cooldowns in a unit (Unit - Reset Ability Cooldowns), but is there a function to reset a specific ability's cooldown on a unit/hero or a tricky way about it?
first remove the ability(s) that are not to be reseted.(but put their levels to a variable)
then do the action reset.
after that add the abilities then set their levels to according to variable.
first remove the ability(s) that are not to be reseted.(but put their levels to a variable)
then do the action reset.
after that add the abilities then set their levels to according to variable.
It's easier the other way around.
1) Save the ability level of your ability in a variable.
2) Remove the ability and add it again.
3) Reset the level.
You don't need the Cooldown-Reset-Action.
This also works fine for hero abilities. Only with abilities in a spellbook it could be a bit more complicated.
meOme is correct. You don't need to reset the ability cooldown if you add/remove it. Furthermore, if you do reset the ability cooldowns in addition to removing/adding the ability, then all of your abilities are going to be "cooled down".
If you remove/add an ability, the cooldown will be reset. If you disable an ability it will not reset the cooldown, such as using SetPlayerAbilityAvailable.
The above discussion relates to old Warcraft versions. However, this thread still comes up in results. The new natives added in version 1.29 make it possible in an easier way. BlzEndUnitAbilityCooldown and BlzSetUnitAbilityCooldown or in GUI:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.