-
Posted by Xers on Mon, 28 Jun 2010 14:07:27
Hi everyone
I'm new to LUA and now i'm searching for some help :)
In an older thread jodyblau posted a wall of code into the forum about animations
http://wowprogramming.com/forums/development/169
Someone in this thread replied, that this is actually a very complicated bit of code.
So i'm asking you :)
Could someone post a minimal example for animations in WoW.
thanks in advance
Xers
-
Posted by jnwhiteh on Mon, 28 Jun 2010 15:41:33
I don't have time to do more than this right now, but:
if not PlayerFrame.ag then PlayerFrame.ag = PlayerFrame:CreateAnimationGroup() local ag = PlayerFrame.ag ag.trans1 = ag:CreateAnimation("Translation") ag.trans2 = ag:CreateAnimation("Translation") ag.scale = ag:CreateAnimation("Scale") ag.rot = ag:CreateAnimation("Rotation") ag.alpha = ag:CreateAnimation("Alpha") end local ag = PlayerFrame.ag ag.trans1:SetDuration(2.0) ag.trans1:SetOffset(200, 0) ag.trans1:SetOrder(1) ag.trans2:SetDuration(2.0) ag.trans2:SetOffset(0, -200) ag.trans2:SetOrder(2) ag.scale:SetDuration(2.0) ag.scale:SetScale(2.0, 2.0) ag.scale:SetOrder(3) ag.rot:SetDuration(2.0) ag.rot:SetDegrees(360) ag.rot:SetOrder(4) ag.alpha:SetDuration(2.0) ag.alpha:SetChange(-1.0) ag.alpha:SetOrder(5) PlayerFrame.ag:Play()