Ok, so second newbish questions for me.
I have a keypad that shows up using OnGUI.
after the user press the correct code, i want to wait for 2 seconds then turn off the gui.
Everything in my code works except for the turning off the gui.
I tried with using a var and say if showGUI == fales then run the gui code.
anyhow, here is the the code… it’s long >_<
var ShowGUI : boolean = false;
var creationTime:float = 0.0;
function Update() {
if (Time.time >= creationTime + 2.0 && numberString =="1234")
{
print(creationTime);
ShowGUI = true;
print (ShowGUI);
}
}
function OnGUI ()
{
if (ShowGUI == false)
{
//create gui for 12 buttons 1-0 + E and C
{// pushing the button C on the keypad does this
Debug.Log(GUI.Button);
checkME();
Debug.Log(numberString.Length);
lock = true;
creationTime = Time.time;
}
}
}