so, … all three independent timers “a” need to complete before any of the three independent timers “b” begin? is that a correct restatement of the problem?
if so, you’ll need some sort of “promise” system, though you could roll your own with just a set of semaphores: have each timer “a” set a semaphore when completed, have those semaphores “watched” during change so that when all three become set it does something (fires off three “b” timers) and disables itself.
the real problem is that you have 3x1 timers (three independent timers that do one thing each), and the problem would be greatly simplified if you could refactor it into 1x3 timers (one single timer that does three things). then when that one timer completes you could use Corona’s built-in “onComplete” mechanism for the “a”'s to fire off another 1x3 timer for the “b”'s [EDIT: i’m scrambling timers/transitions here, oops, but refactoring point remains: have 1 timer that prints 3 a’s, then set a timer to print 3 b’s)
three independent timers have another problem, if you assume that they themselves will be synchronous, because they’re not - even your “a”'s aren’t guaranteed to be synchronous, they’re truly independent. it’s too much to get into here, as to real-time versus the non-zero time it takes to execute your loop, but run; the following code for an hours and see if it prints any “OOPS”, then do some self-study to figure out why. misunderstanding this can lead to some really hard to debug problems.
local frameCounter = 0 local semaphore = { 0,0,0 } local DELAY = 100 local function flag1() semaphore[1]=frameCounter end local function flag2() semaphore[2]=frameCounter end local function flag3() semaphore[3]=frameCounter end local function startem() -- these three timers are independent, and NOT guaranteed to complete during the same frame timer.performWithDelay(DELAY,flag1); semaphore[1]=0 timer.performWithDelay(DELAY,flag2); semaphore[2]=0 timer.performWithDelay(DELAY,flag3); semaphore[3]=0 end local function checkem() -- have all timers fired yet? if (semaphore[1]\>0 and semaphore[2]\>0 and semaphore[3]\>0) then -- did they all fire on the same frame?? if (semaphore[1]==semaphore[2] and semaphore[2]==semaphore[3]) then -- fine, no problem --print("OK") else -- oops, told ya so print("OOPS", semaphore[1], semaphore[2], semaphore[3]) end -- do it all again startem() end end local function onEnterFrame() checkem() frameCounter = frameCounter + 1 end Runtime:addEventListener("enterFrame", onEnterFrame) startem()