Help with storyboard / composer.

It really helps to have your code indented and use code formatting when posting code. Please use the <> in the edit bar (with Bold, Italic, etc. ) and paste your code in there:
 

local function walkCollision(self, event) if event.phase == "began" then --if event.target =="walk" and event.object.type == "food" then if event.other.type == "food" then print ("eating") score = score + 100 updateScore(event) local function playsoundd() audio.play(eatSnd) end timer.performWithDelay(200, playsoundd) event.other:removeSelf() transition.to ( event.other, { time=1000,y=screenBottom+ 5000} ) walk:setSequence("eat") walk:play() timer.performWithDelay (100,standAgain) else health = health -1 showHealth() walk:setSequence("hit") walk:play() timer.performWithDelay (100,standAgain) print("Oeeeeeeeeeeeee") if health == 0 then -- THIS IS WHERE I AM TRYING TO GO TO THE NEXT GAME OVER SCENE--------------------------------------------- print("GAME OVER") end

I’m assuming that you didn’t show the rest of the function on purpose.  Are you getting any of the prints (“Oeeeeeeeeeeee”, “GAME OVER”)?

Rob

Sorry about posting the code like that, I’m new to coding and having been following the infinite skill mobile game development. They say to use ctrl+] for intending which dosen’t work in the current outlaw’s version. Thanks for the little tip.

Yes I am geting the prints “Oeeeeeeeeee” and “GAME OVER” on the console. so the code is working. this is the whole collision function I posted here. I can post other functions too if you want me to?

and the Game Over scene I’m trying to go to is working if I put it in my main.lua file so the problem is also not with the gameOver scene file that is okay. I’m just having issues going to a diffrent scene

Are you getting any errors in your console log?

If you’re getting the game over print, there is no reason it won’t go to the new scene unless a) the scene doesn’t exist or b) the scene has errors.

Rob

I just recorded my screen to demonstrate whats going on. please check out this video

http://www.dailymotion.com/video/x33pec3

you will see I am not getting any errors and my gameOver scene is working fine but I am not able to go to the next scene :’( it’s frustrating now. Its been more than 24 hours me trying to get around it. Please help

Oh my I got it what was going wrong! my background was on top of everything so the scene was being called under the background hence giving out no errors and displaying on screen but still not visible :stuck_out_tongue:

I got it working by setting my background to back i.e object:toBack()

Thank you @Rob for putting in effort to help me with this!

:smiley: