I’m really new to Corona and Lua. So far I’m really happy with both–although the lack of a ; at the end still makes me twitch 
In writing my first game, I’m trying to sync a lot of animations with what else is going on so have at least one function that needs to pause for a bit, then continue (e.g. start animation1, pause for 100ms, start animation2, then update some variables).
Seems like the way to do it is to use timer.performWithDelay(). However, this seems to continue running everything else in the function, so the order of execution ends up being: 1)start animation1, 2)update the variables, 3)start animation2
Here’s the code snippet, if that’s helpful:
nextCardL:playClip("flip")
timer.performWithDelay(flipTime\*0.2, function() currentCardR:playClip("flip") end, 1)
timer.performWithDelay(flipTime, flipLCards, 1)
currentIndex = currentIndex + 1
My assumption is that I’m just thinking about this wrong because I’m new to the language. Any suggestions?
Thanks. [import]uid: 136105 topic_id: 23964 reply_id: 323964[/import]