• 🏆 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!

Set Cooldown of Item to Value of Timer?

Status
Not open for further replies.
Level 18
Joined
Mar 16, 2008
Messages
721
I don't see any trigger action that can set ability cooldown. Is this possible? If it is, how can I convert timer value to integer?

Main problem is when you drop an ankh and pick it up again, cooldown gets set to zero.

Thank you for reading.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
would this specifically work for an item? There's already a GUI option for unit ability.

Let's say I have an ankh with a 180 sec cooldown, and I want to proc the cooldown without using the item and start the cooldown at say 180 when it's picked up. I need to re-set the cooldown because each time this item is picked up, the cooldown is reset for some reason.

  • Unit - For Unit (Picked unit), start cooldown of ability Animate Dead " over "50.00 seconds.
  • Custom script: call native SetUnitAbilityCooldown udg_Yellow_Hero, integer abilId, integer level, real cooldown returns nothing
 
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
577
When I add a cooldown to ankh item, nothing happens. The cooldown never triggers even though I have I have several ankhs in my inventory when the hero dies. I am pretty sure that should work though and I am very confused. Am I doing something wrong or are you talking about some other item? Another possibility is that my version of warcraft has for some unfathomable but not surprising reason fucked up ankh cooldown.
 
Level 18
Joined
Mar 16, 2008
Messages
721
It's operating by trigger/timers so the cooldown display is more just to give an indication to the play what the cooldown is. Do you know some way to change the displayed cooldown of an item/item ability?
 
Level 19
Joined
Feb 27, 2019
Messages
577
I am not quite sure what youre after here. The gui action and custom script you already posted does that. The gui action and custom script does not seem to work for the item ability "Item Reincarnation" though, so if youre goal is simply to display to the player that its on cooldown I suggest using another item ability.
 
Status
Not open for further replies.
Top