I have three scripts:
Variable:
static var score = 0;
Present 1:
var score= Variables.score;
function OnTriggerEnter ()
{
score = score+1;
}
and win:
var score= Variables.score;
function Update(){
if(score==1){
Application.LoadLevel("Level 1");
}
}
Basically I have the var for the score and when I collide with a collider it should add 1 to the variable. for testing weather the script works we are just starting at if the variable score equals on, but its not working. Any ideas?
↧