SetTimeout function in lua? How to make fadeIn after fadeOut
Posted: Sat Nov 08, 2014 11:42 am
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) :
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
Code: Select all
function fadeOutAndInEffect()
GameMode.fadeOut(0, 1)
GameMode.fadeIn(0, 1)
endAnd... another question - how to use color corectly: GameMode.fadeOut(color, length). I want green color, and 1 second fadeout. I use this code:
Code: Select all
GameMode.fadeOut(0, 255, 0, 1)Please help