Hey guys, another durpy question, but after trying to get a notification to pop up if you are in range of an object for several hours, I decided I needed to look into it. Even though this script brings up no console errors, the boolean will not change when the Player enters the Collider area. And yes, I have made sure that the Player Game object is Tagged. Any help would be appreciated!!!
var gui : boolean = false;
function OnGUI(){
if (gui == true){
GUI.Label (Rect (10, 10, 100, 20), "Press E to Add To Inventory");
}
}
function OnTriggerEnter (myTrigger : Collider) {
if (gameObject.tag == "Player") {
gui = true;
}
}
function OnTriggerExit (myTrigger : Collider) {
if (gameObject.tag == "Player") {
gui = false;
}
}