View Single Post
08-21-16, 10:50 PM   #2
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Lua Code:
  1. local scalePush = 1.2
  2. local scalePull = 1 / scalePush
  3.  
  4. local scaleOut = LavaSurgeBar.scaler:CreateAnimation("Scale")
  5. scaleOut:SetOrder(1)
  6. scaleOut:SetDuration(0.5)
  7. scaleOut:SetStartDelay(0.1)
  8. scaleOut:SetSmoothing("IN_OUT")
  9. scaleOut:SetFromScale(1, 1)
  10. scaleOut:SetToScale(1, scalePush)
  11.  
  12. local scaleIn = LavaSurgeBar.scaler:CreateAnimation("Scale")
  13. scaleIn:SetOrder(2)
  14. scaleIn:SetDuration(0.5)
  15. scaleIn:SetStartDelay(0.1)
  16. scaleIn:SetSmoothing("IN_OUT")
  17. scaleIn:SetFromScale(1,1)
  18. scaleIn:SetToScale(1, scalePull)
  19.  
  20. LavaSurgeBar.scaler:Play()


when doing scaleOut -> 1.2 is the new base value (100%) so you have to math out the old 1.0 by doing:
1 / 1.2

Last edited by syncrow : 08-21-16 at 11:01 PM.
  Reply With Quote