View Single Post
04-30-09, 07:24 AM   #1018
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Tastyfrog View Post
I wanted to change ouf_BarFader to fade the bars slowly... unfortunately im pretty new to lua
This is what i have so far, but it doesnt seem to be working
Code:
local function Update(self)
	local currentAlpha = self:GetAlpha()
	if(Validation(self, self.unit)) then
		if(currentAlpha > 0.2) then
			self:SetAlpha((currentAlpha - 0.1))
		end
	else
		if(currentAlpha < 1.0) then
			self:SetAlpha((currentAlpha + 0.1))
		end
	end
end
any help?
Im gonna add this to oUF BarFader myself, once I get time to do it.