-
Posted by cormanthor on Thu, 15 Dec 2011 05:33:47
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:
-- 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)
-
Posted by jnwhiteh on Mon, 19 Dec 2011 10:47:02
Animations will not work on something like the actual texture portion of the minimap, because it is not a frame/texture in the normal sense. It is implemented outside of addon-land by the client. You can probably do some of this manually by setting the size and the position, but I'm not entirely sure.
-
Posted by cormanthor on Mon, 19 Dec 2011 20:28:53
It appears that none of the animation system applies to the Minimap. I could make my own via an OnUpdate script, but I think it would be too jerky. Oh well. Instantaneous will have to do.
-
Posted by jnwhiteh on Thu, 22 Dec 2011 14:23:11
OnUpdate shouldn't be jerky at all, actually!