I Need help with an script in an audio of me. When im touching the brick the audio will play but i need to insert a line of script so that when i have touched the brick the sound cant be player again. :
’
#pragma strict
var loudBang:AudioClip;
function OnTriggerExit(o:Collider){
Debug.Log(“The trigger fired”);
audio.PlayOneShot(loudBang);
}
This is JS.
Where do i put the line of script so that when i touch it it cant be played again.
MORE INFO ( If necesarry ) :
Its a gameobject
Its a audio source
I did the script in JS
Thanks
- Vince