Do you want the frame to fade out when you are Out of Combat? When? On choice?
You can use the following to get started:
frame:SetAlpha(value) - sets the alpha value of a frame
frame:RegisterEvent("event") - registers an event that you can later use to do things when it triggers
PLAYER_REGEN_DISABLED - an event that is triggered when you ENTER combat
PLAYER_REGEN_ENABLED - when you leave combat
PLAYER_ENTERING_WORLD - when you see a loading screen (this is only useful if you want to start out with an alpha value of something OTHER than 1)
You will need to use these events under your OnEvent function. Something like this:
Code:
function OnEvent(self, event, arg1)
if (event == "PLAYER_REGEN_DISABLED") then
frame:SetAlpha(in_combat_value_here)
elseif (event == "PLAYER_REGEN_ENABLED") then
frame:SetAlpha(out_combat_value_here)
end
end
Hope I helped you out somehow!