- Home /
How to create a complicated game over scene ? Help
I know it sounds stupid but I have looked every where and I can't find an answer. I have a ball and seven walls I want to go to my levels scene and I also want it so when the ball passes a certain point the level is completed so I added this script: function Update () { if(transform.position.y< -5) Application.LoadLevel("gameoverscene") }
but it isn't working thanks in advance!
Answer by slayer29179 · Jun 22, 2013 at 04:58 PM
Your script looks flawless.
Have you attached it to the moving object?
Is your scene called gameoverscene?
Have you added gameoverscene to the build menu? File > Build Settings
Play the game and watch the transform position of your object, does it become the answer you need?
Try changing the
transform.position.y < -5
to
transform.position.y > -5
Some times it can be the opposite way you require :) Hope this helps!
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Application.LoadLevel() doesn't clear screen 1 Answer
Application.Loadlevel("Level Name"); not working on android 2 Answers
Collisions not working. 1 Answer
How to create a complicated game over scenario ? HELP 0 Answers