Thread Tools Display Modes
12-11-11, 09:56 AM   #1
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
Animation of the Minimap

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)
Attached Files
File Type: lua cormMiniMap.lua (5.0 KB, 608 views)
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote
12-14-11, 11:21 PM   #2
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
As an update, this is still not working even if I try cutting out everything but the Minimap translations. Can you even animate the Minimap itself, or is it immune?
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote
12-15-11, 05:45 PM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Not sure. The minimap is the only frame that has a mask attached.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
12-15-11, 06:03 PM   #4
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
Maybe I should submit this to Blizzard as a suggestion for 5.0?
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote
12-15-11, 11:26 PM   #5
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
Only region objects returned by frame:GetRegions() are affected by the animation system. That means only Textures and FontStrings, so any visual not made up of those won't animate. I think these are all the types that don't work:
  • Minimap
  • QuestPOIFrame/ArchaeologyDigSiteFrame
  • Model/PlayerModel/DressUpModel/TabardModel
  • Cooldown
  • MovieFrame
  • The clipping region of ScrollFrames
  • Textures embedded in FontStrings with "|T...|t" (since they're not properly parented to the FontString's parent)
  Reply With Quote
12-16-11, 01:12 AM   #6
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
Thank you very much.
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Animation of the Minimap

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off