Hey everybody, thanks for future replies! Okay so I have this:
function prepareMoles()
for i = 1, 1 do
mole = display.newImage(‘mole.png’, 200, 200)
mole:addEventListener(“tap”, moleHit)
mole.isVisible = false
mole.id = i
moles[i] = mole
<------ Here?
end
startTimer()
end
function startTimer()
timerSource = timer.performWithDelay(1400, showMole, 0)
end
function showMole(e)
if(currentMoles == totalMoles) then
alert()
else
lastMole.isVisible = false
local randomHole = math.random(1, 1)
lastMole = moles[randomHole]
lastMole:setReferencePoint(display.BottomCenterReferencePoint)
lastMole.yScale = 0.1
lastMole.isVisible = true
Runtime:addEventListener(‘enterFrame’, popOut)
currentMoles = currentMoles + 1
end
end
I want to add another “MOLE” in the display.group but that has a different function. How and where would I put it at ? any help will be greatly appreciated!