My file levels.lua has 4 levels. The icon of level 1 appears first. The touch listener on level 1 is disabled until all levels appear on screen. After 1 sec, level 2 appears then level 3 and after level 3, level 4 appears. After level 4, the touch on level 1 is enabled by calling a function. I utilized timer.performWithDelay but the last timer never executes. This is what I wanted to do.
local function Level5Popup( ) beachImg, beachHImg = artassets.getLevel1Map(); dimFair, dimMall, dimFarm = artassets.getAllLocks(); lock1, lock2, lock3 = artassets.getDimmedScreens(); end local function Level2Popup( ... ) farm = artassets.getLockedLevels2();-- body end local function Level3Popup( ... ) funfare = artassets.getLockedLevels3(); end local function Level4Popup( ... ) shoppingMall = artassets.getLockedLevels4(); level5 = timer.performWithDelay( 5000, Level5PopUp, 1 ) ---this timer never executes I want this to execute end level1 = timer.performWithDelay( 1000, Level1Popup, 1 ) level2 = timer.performWithDelay( 2000, Level2Popup, 1 ) level3 = timer.performWithDelay( 3000, Level3Popup, 1 ) level4 = timer.performWithDelay( 4000, Level4Popup, 1 )