Hi Duugu,
I think the problem is that you set the font string to be size 30, and WoW won’t render text much bigger than that (the point size depends on the font file, but there is an maximum “physical” size limitation built into the game), even if you try to scale it. If you want the font to be that big, you can only scale it smaller.
Also, you only need one animation to get a “pulse” effect. Just set the looping type on the animation group to “BOUNCE” instead of “REPEAT”. You only need two animations if you want the “scale up” and “scale down” animations to happen at different speeds.
I wasn’t sure why you put in a start delay on your second animation, so I left that out, but if you wanted it to pause between the “scale up” and “scale down” animations you should use the SetEndDelay or SetStartDelay method on the animation. Actually I think you were trying to make it run one animation and then the other, which is what the animation:SetOrder method is for.
Here’s what I got working:
Lua Code:
local tframe = CreateFrame("Frame", "testframe", UIParent)
tframe:SetWidth(200)
tframe:SetHeight(200)
tframe:SetPoint("CENTER", UIParent, "CENTER")
local Texture = tframe:CreateTexture(nil,"OVERLAY")
Texture:SetTexture("Interface\\Tooltips\\UI-Tooltip-Background")
Texture:SetWidth(200)
Texture:SetHeight(200)
Texture:SetPoint("BOTTOM")
local tFS = tframe:CreateFontString(nil, "OVERLAY")
tFS:SetFont("Fonts\\FRIZQT__.TTF", 30, "OUTLINE")
tFS:SetText("TestString")
tFS:SetPoint("BOTTOM")
local ag = tframe:CreateAnimationGroup()
ag:SetLooping("BOUNCE")
local a2 = ag:CreateAnimation("Scale")
a2:SetScale(0.66, 0.66)
a2:SetDuration(1)
a2:SetSmoothing("NONE")
ag:Play()
I also took out the lines that weren’t needed. Things are shown by default when you create them, and font strings default to white.
I did notice that WoW doesn’t scale font strings very well. It isn’t very smooth, and it seems to scale it relative to the bottom left of the font string no matter how it’s anchored.
Also, it wouldn’t make your code not work, but you had both animation groups assigned to the local variable “a2”.
Hope that helps!