I dont know any coding and I was wondering does anyone have a script that will load a level after hitting a score.
Thanks
I dont know any coding and I was wondering does anyone have a script that will load a level after hitting a score.
Thanks
Like this:
Create a score script - let’s call it Score.js
static var score : int;
var nextLevelScore : int;
var nextLevelName : string;
function Update() {
if(score > nextLevelScore) {
Application.loadLevel(nextLevelName);
}
}
In each level attach this script to a game object and use the inspector to set the values.
Add to the score using Score.score e.g.:
Score.score += 10; // add 10 to score
Score.score = 0; // initialize the score at the start of the game