I have two scripts in different .js files and i want to refer to one through the other, i have watched the GUI tutorial by tornadotwins, and i am trying that method to get a guitexture to show when my player collides with a pickup.
Here is the script for PointGet which i want to make the gui appear with
#pragma strict
static private var onPoint : boolean = false;
function FixedUpdate () {
if(onPoint == true){
guiTexture.color.a = 255;
yield WaitForSeconds (1);
onPoint = false;
}
}
That script is triggered from a script in my player file:
if(shipTrigCollision.gameObject.tag == "TrianglePickup"){
PointGet = true; // Sets the statement as true in our pointget script
audio.PlayOneShot(trianglePickupCollideSound);
Destroy(shipTrigCollision.gameObject); // Destroys the game object
}
That script is triggered from a FixedUpdate function in the player file, i have no idea what i am doing wrong. I would be grateful if someone could point at the errors