thank-you very much! this works really good. i really appreciate the help.
i have used this function (see code below) in the game where there is a timer where you only have a few seconds to complete the particular level.
if you don’t complete the level in-time it goes to gameover… this part works great, however if i complete the level and get on to the next one, the timer doesn’t stop and still goes to gameover screen.
im trying to work out how to group this function into the scene (to stop this happening) to stop it moving over to the next scene… if you have any ideas would be really appreciated
thanks again in advance!
local function changeToGameover(event)
director:changeScene(“gameover”,“overFromTop”)
end
timer.performWithDelay(3000, changeToGameover)
local function bt ( event )
if event.phase == “ended” then
changeToGameover()
localGroup:insert(changeToGameover)
end
end
[import]uid: 10239 topic_id: 3791 reply_id: 11568[/import]