thank-you very much for your reply- i have the function set up at the moment as a touch button to go from one screen to the other, however im still having trouble trying to change this function to a timer to go to “level3” automatically after 30 seconds
thanks in advance
local bt02 = display.newImage(“images/bt_moveFromRight.png”)
local function bt02t ( event )
if event.phase == “ended” then
director:changeScene(“level3”,“moveFromRight”)
end
end
bt02:addEventListener(“touch”,bt02t)
bt02.x = 240
bt02.y = 80
localGroup:insert(bt02) [import]uid: 10239 topic_id: 3791 reply_id: 11533[/import]
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]
Guys, please write your questions at Director’s sub-forum. I don’t have too much time to answer and I really didn’t see most of the topics created for Director. I’m sorry for that and I will appreciate if you all could go to this link: