Hey Corona Developers! I couldn’t get around this small issue I encountered and need a bit of help. I have a timerSource that makes moles pop out and the objective is to get through the waves of moles popping out on the screen by hitting them. However as soon as I press play the moles start popping out instantly, how can I delay the moles for seconds that i desire, then make the moles start popping out. Here is part of my coding, anything helps, thanks!
local function showmole() lastmole.isVisible = false local randomHole = math.floor(math.random() \* 1) + 1 lastmole = moles[randomHole] lastmole:setReferencePoint(display.BottomCenterReferencePoint) lastmole.yScale = 0.1 lastmole.isVisible = true transition.to(lastmole, { time=300, yScale=1 }) end function startTimer() if wavemoles == waveTable[wave] then wave = wave + 1 print(tostring(wave)) print(waveText.text) waveText.text = tostring(wave) print(waveText.text) waveText.text = tostring(wave) wavemoles = 0 timerSource = timer.performWithDelay(timeToNextWave, startTimer) return end timerSource = timer.performWithDelay(timeToNextmole, startTimer) showmole() wavemoles = wavemoles + 1 timeToNextmole = math.max(timeToNextmole - 30, 600) end