Ello, Im trying to finish off the audio to my game, I have onle last problem where I'm trying to make it so what you walk into an object a sound is triggered then the object disappears so the player doesnt walk into it again. I have that bit. Now I want to make the object reappear after a certain amount of time.
I'm trying to add to this.
var trigger : AudioClip;
function Start () {
audio.loop = false;
}
function OnTriggerEnter (other : Collider) {
if(other.gameObject.name == "MainCharacter"){
audio.PlayOneShot(trigger);
}
}
function OnTriggerExit (other : Collider) {
Destroy (gameObject, 10);
}
Thanks