have a presentation in a few hours, and im desperate. one of my scripts is acting up.
Basically a Box Collider is hit and audio and text come out.
var stringToEdit = " ";
var showgui:int=0;
var PlayClip:audio.Play;
function OnGUI () {
if (showgui==1){
// Make a multiline text area that modifies stringToEdit.
stringToEdit = GUI.TextArea (Rect (10, 10, 300, 100), stringToEdit, 200);audio.Play(PlayClip);
}
}
function OnTriggerEnter(){
showgui=1;
}
GUI came out but audio was messed up! Whats wrong?