- Home /
How to make a saved score destroy on load new scene
Hi,
I have my game which once you have destroyed all 6 tagged targets then my gameEnd = true.
so my score shows on the next screen etc with two buttons "main menu" & "Quit"
When you press main menu and then press play it instantly loads the game then a split second later loads the final score screen with the previous score achieved rather than playing again.
How do I stop the score from being remembered on the button being pressed? Or is this something else?
try setting gameEnd to false when you click on main menu?
I have tried this:
function On$$anonymous$$ouseDown ()
{ if (Input.Get$$anonymous$$ouseButtonDown(0)) { ScoreScript.gameEnd == false; Application.LoadLevel ("SplashScreenStart");
}
}
Should that work or am I doing that wrong?
Thanks.
ScoreScript.gameEnd == false;
This, you are comparing gameEnd to false, but you aren't setting it to false. Use this ins$$anonymous$$d:
ScoreScript.gameEnd = false;
Your answer
Follow this Question
Related Questions
How to switch scenes with two players using Photon? 1 Answer
GetComponent doesn't work 2 Answers
DontDestroyOnLoad Slowing Loading Down 0 Answers
How to disable Dont destroy on load 0 Answers
Creating and destroying password stage between scenes 0 Answers