I have a problem with GameMode.fadeIn(color, length) and GameMode.fadeOut(color, length). First I want fadeOut screen, then fadeIn. But code below doesn't work, because both actions runs together (not second after first) :
Code: Select all
function fadeOutAndInEffect()
GameMode.fadeOut(0, 1)
GameMode.fadeIn(0, 1)
end
I want (for example) fade out screen and after 5 second fade in. How to do that? How to run one action after other in lua? Somethink similar to JavaScript SetTimeout?
And... another question - how to use color corectly: GameMode.fadeOut(color, length). I want green color, and 1 second fadeout. I use this code:
... and doesn't work. It makes fadeout to black with 255 second delay
Please help
