I'm trying to animate the Minimap through translation and scale transitions, based on a conditional. I have the lua functioning as intended, but the animation only works on translation of the border frame, not the scale, and neither on the Minimap itself. I read on here that parenting did not affect animations, which is why I duplicated my efforts between the two frames.
I've attached the .lua file in its entirety for better troubleshooting (Mask.tga can be subbed out for the WHITE8X8 image). Any help would be greatly appreciated.
Here's the relevant code:
Code:
-- create animation effects
-- working as intended
local partyAGborder = mm:CreateAnimationGroup()
local trans1border = partyAGborder:CreateAnimation("Translation")
trans1border:SetOffset(xOffset,yOffset)
trans1border:SetDuration(duration)
trans1border:SetSmoothing("IN_OUT")
trans1border:SetOrder(1)
-- end working section
local scale1border = partyAGborder:CreateAnimation("Scale")
scale1border:SetScale(smallScale,smallScale)
scale1border:SetOrigin("CENTER", 0, 0)
scale1border:SetDuration(duration)
scale1border:SetSmoothing("NONE")
scale1border:SetOrder(1)
local partyAGmap = Minimap:CreateAnimationGroup()
local trans1map = partyAGmap:CreateAnimation("Translation")
trans1map:SetOffset(xOffset,yOffset)
trans1map:SetDuration(duration)
trans1map:SetSmoothing("IN_OUT")
trans1map:SetOrder(1)
trans1map:SetScript("OnFinished", function(self) MoveMap(nil, "party") end)
local scale1map = partyAGmap:CreateAnimation("Scale")
scale1map:SetScale(smallScale,smallScale)
scale1map:SetOrigin("CENTER", 0, 0)
scale1map:SetDuration(duration)
scale1map:SetSmoothing("NONE")
scale1map:SetOrder(1)
-- working as intended
local soloAGborder = mm:CreateAnimationGroup()
local trans2border = soloAGborder:CreateAnimation("Translation")
trans2border:SetOffset(-1*xOffset,-1*yOffset)
trans2border:SetDuration(duration)
trans2border:SetSmoothing("IN_OUT")
trans2border:SetOrder(1)
-- end working section
local scale2border = soloAGborder:CreateAnimation("Scale")
scale2border:SetScale(largeScale,largeScale)
scale2border:SetOrigin("CENTER", 0, 0)
scale2border:SetDuration(duration)
scale2border:SetSmoothing("NONE")
scale2border:SetOrder(1)
local soloAGmap = Minimap:CreateAnimationGroup()
local trans2map = soloAGmap:CreateAnimation("Translation")
trans2map:SetOffset(-1*xOffset,-1*yOffset)
trans2map:SetDuration(duration)
trans2map:SetSmoothing("IN_OUT")
trans2map:SetOrder(1)
trans2map:SetScript("OnFinished", function(self) MoveMap(nil, "solo") end)
local scale2map = soloAGmap:CreateAnimation("Scale")
scale2map:SetScale(largeScale,largeScale)
scale2map:SetOrigin("CENTER", 0, 0)
scale2map:SetDuration(duration)
scale2map:SetSmoothing("NONE")
scale2map:SetOrder(1)