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

Activate cooldown when building is finished

Status
Not open for further replies.
Level 10
Joined
Jun 6, 2007
Messages
392
I'm creating superweapons (like in c&c series), which are basically buildings, which have abilities with a long range and cooldown. What I want, is that when a building is finished, the cooldown is activated immediately. One solution would be to order unit to cast the ability, but it would have to be interrupted before the effect takes place. It might also be possible to simulate this with items and start stock delay, but in that case, there are visible numbers (charges). Is there any better solution?
 
Level 11
Joined
Jan 23, 2015
Messages
788
Make a dummy spell with the same icon but does nothing and has the cooldown you want. When the unit finishes with the effect of the ability remove the original and add the dummy spell, cast it and then start a timer for the cooldown, return the original ability once it expires.
 
Last edited:
Status
Not open for further replies.
Top