Hi,
I want to make a script, but the console shows me that I need to insert another character. The problem is that it is correct. Help!
Here is a script:
var tekst : GUIText;
var fpc : GameObject;
var bron : GameObject;
var vis : boolean;
var Hand : GameObject;
var distance;
static var bronZabrana : boolean = false;
function OnBecameVisible() {
vis = true;
}
function OnBecameInvisible () {
vis = false;
}
function Update() {
distance = Vector3.Distance(bron.transform.position, fpc.transform.position);
}
if ((distance < 1.1) (vis == true)); {
tekst.enabled = true; //Here is the error
}
if ((Input.GetKeyDown("f")); {
bronZabrana = true;
tekst.enabled = false;
bron.transform.parent = Hand.transform;
}
if ((vis == false) || (distance > 1.1)) {
tekst.enabled = false;
}