WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Speeding up an animation (https://www.wowinterface.com/forums/showthread.php?t=54080)

natinusala 07-31-16 06:56 AM

Speeding up an animation
 
Hello,

As of 7.0 the combo points for the rogue are displayed under the player's frame, much like the SP's orbs or the old demonist's shards.

The thing is that the animation is kinda slow and with certain Roll the Bones buffs, I gain combo points faster than the combo point animation shows them. I end up losing some, as I try to gain more CP while being 6/6 (and not seeing it yet).

I would like to create an addon to speed up the animation. I discovered that the animation was defined on this file of the game, and used in this one. The animation name would be "AnimIn" and "AnimOut".

Do you happen to know if it's actually possible for an addon to alter this animation and speed up its duration ? If possible, how ?

Thanks a lot !

Phanx 07-31-16 09:37 AM

lua Code:
  1. for _, f in pairs(ComboPointPlayerFrame.ComboPoints) do
  2.     for _, g in pairs({ f:GetAnimationGroups() }) do
  3.         for _, a in pairs({ g:GetAnimations() }) do
  4.             a:SetDuration(a:GetDuration() * 0.5)
  5.         end
  6.     end
  7. end
Should, in theory, reduce the animation time by 50%. If you want them even faster, lower the multiplier.

natinusala 07-31-16 12:46 PM

It works well, thanks ! There is however a minor issue with the "Star" effect of the "AnimIn" animation which is supposed to occur after the combo point has been added to the bar ; the Star effect start delay is 0.5 times too long. Would it be a good idea to add this code

Lua Code:
  1. a:SetStartDelay(a:GetStartDelay() * 0.5)

To remove the delay problem ? Obviously assuming that Get and SetStartDelay exists.

Phanx 07-31-16 07:39 PM

Yes, probably. You may also want to handle Get/SetEndDelay. I'm not sure what those return if there's no delay, but you may need to check for that:

lua Code:
  1. a:SetStartDelay((a:GetStartDelay() or 0) * 0.5)
  2. a:SetEndDelay((a:GetEndDelay() or 0) * 0.5)

natinusala 08-01-16 05:18 AM

It works very well, thanks :)

Do I have your permission to upload it to Curse, by giving you credit obviously ? It may be useful to someone else

Phanx 08-02-16 02:47 AM

Go for it.

combopoints 02-23-24 04:33 PM

Speeding up an animation
 
As a noob with this problem... How do I test this weak aura out? Tried searching but it was from so long ago.

Running into this issue where the game sometimes just isnt displaying the combo points fast enough to react properly. Anyway to still add this in or how do I begin to learn?


All times are GMT -6. The time now is 02:30 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI