Ok, so I have been searching all over for help and right when I think I find a solution, I encounter a problem. I haven’t scripted in a bit, so I am a bit rusty. Anyways, I want to enable a script of a different GameObject (in this case, one on the Main Camera in the FPS player prefab) and I can’t seem to get it. Any time I try to use “.enabled” I get a syntax error. I have done this before, but cannot remember how. Here is what I have:
#pragma strict
function Start ()
{
var Blur : GameObject.Find("First Person Controller");
Blur.GetComponent("Indie Effects").enabled = false;
}
function OnTriggerEnter (col : Collider)
{
if (col.tag == "Player")
{
Blur.active = true;
}
}
function OnTriggerExit ()
{
Blur.active = true;
}