SOLVED ----I meant to set my fadeSpeed to 1000. Sorry, everyone!
------------------ Original Post Below ----------------------------------
Hello... I am simply trying to fade a sprite out (UIManBlackCover). Can anyone see what I am doing wrong? I am debugging and the alpha goes from 255 down to 253 on the first iteration... but then stays on 253 for infinity.
function UIManFadeOutBlackCover()
fadeSpeed = 10
while (GetSpriteColorAlpha(UIManBlackCover) > 5)
currentAlpha = GetSpriteColorAlpha(UIManBlackCover)
Log(str(currentAlpha))
SetSpriteColorAlpha(UIManBlackCover, currentAlpha - (fadeSpeed * GetFrameTime()))
sync()
endWhile
SetSpriteColorAlpha(UIManBlackCover, 0)
SetSpritePositionByOffset(UIManBlackCover, gloOffScreen, gloOffScreen)
sync()
endFunction