Hi,
In my game, an item’s effect is to pause the game, fade-in a a white screen, show an animation, move that object to several locations on the screen, fade-out the white screen, un-pause the music and un-pause the physic but my problem is how to do chain them.
I wanted to do all of them with timer.performWithDelay and it’s what I’ve done so far:
physics.pause() sfxManager.pauseMusic() timer.performWithDelay(10, function() whiteScreen.alpha = whiteScreen.alpha + 0.1 end, 20) timer.performWithDelay(10, function() whiteScreen.alpha = whiteScreen.alpha - 0.1 end, 20) timer.performWithDelay(3000, function() sfxManager.playMusic() end) timer.performWithDelay(3000, function() physics.start() end)
But since I’m using timer for fade-in, I can’t chain other effects to it since they will start at once.
Thanks.