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

Custom cooldown model as UI sprite

Not open for further replies.
So I was tinkering around with UI natives to create a custom ability bar and good quite far. But I'm having some trouble implementing a cooldown clock on top of the ability icon.

So far, I've found a way to display the cooldown clock model from UI\\Feedback\\Cooldown\\UI-Cooldown-Indicator.mdl
I then found out I can use call BlzFrameSetSpriteAnimate(model, 2, 0) to play the clock animation on the model and call BlzFrameSetSpriteAnimate(model, 1, 0) to play the shiny glow once the cooldown finishes.

But I can't figure out how to change the time scale of the animation. Something like SetUnitTimeScale() doesn't exist for the UI sprite native.

Any ideas or workarounds?
Support for UI models isn't very good. Only certain animations work, you don't have control over timescale, you can't rotate them, they don't support attachments, etc..

I personally use the default command buttons which has cooldowns built in but you are limited to 12 buttons.
Id like more power over it so I implemented my own custom command buttons.

I did apply a workaround now by simply editing the cooldown model to provide multiple animations with different rotation speeds that i trigger via SpriteAnimate.
Not open for further replies.