Blockquote
var score : int 0;
var gui : GUISkin;
var buttonReady : boolean = false;
function OnTriggerEnter(other : Collider ) {
if (other.tag == "item") {
score += 1;
Debug.Log("Score is now " + score);
}
}
function Update () {
if ( score > 5) {
Application.LoadLevel (0);
}
}
I have this script that I am trying to use to change a level when 6 of these objects are touching the object that has the script attached. Unfortunately I cannot get it to work, can anyone help?