• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Rewind cooldown

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
How do you store the remaining cooldown of an ability and then after some seconds rewind it to the stored remaining time?
 
Level 6
Joined
Apr 15, 2012
Messages
205
I can't find how to get the remaining time for an ability's cooldown, only for the weapon cooldown. Where do I find this and how do I recall it?
 
Level 1
Joined
Sep 23, 2012
Messages
4
What you're looking for is called "Cooldown For Unit Ability" and it's a real value.
 
Level 1
Joined
Sep 23, 2012
Messages
4
First you store the remaining cooldown in a variable. At the time you want to rewind the cooldown you just set it to the value of the variable. However, as far as I know there is no action to set the cooldown to a specific value. You probably have to use "Add Cooldown For Unit Ability" and do some arithmetic operations involving your variable and maybe the maximum cooldown time to get the desired result.
 
Status
Not open for further replies.
Top