I have written a small snippet of code to show certain aspects of the minimap children, by controlling their alpha, when I mouseover the minimap. Further, when the mouse leaves the minimap, it starts a fadeout process that occurs relatively smoothly, 20 incremental decreases of alpha by 0.05 over 1 second. I couldn't think of a better way to code this, and everything works as intended. I am writing this to determine how to do it better.
Thank you, I'm guessing this is way over engineered and am eager to learn more about how to do this more efficiently.
local fadeouttimer =1
local subtractor = fadeouttimer/20
if Minimap:IsMouseOver()then--mouse reentered during fadeout, cancel the ticker, reset the timer, and set alphas back to 1
fadeouttimer = fadeouttimer - subtractor
GameTimeFrame:SetAlpha(fadeouttimer or0)-- or 0 for when the game inevitably determines that 0 is actually a tiny negative number