Hey all,
I put together a very basic play sound trigger script and want it to only play once. Currently it plays every time the player enters the trigger (which makes sense). So basically I just want to trigger the sound once and then deactivate the trigger... or is there a better way? Thanks in advance!
Here's my code..basic stuff:
var Audio : AudioClip; function OnTriggerEnter(col : Collider) //Play Sound if player enters trigger
{ if (Audio) { AudioSource.PlayClipAtPoint(Audio, transform.position);
}
}
OUTSTANDING! Worked like a champ... thank you!
– anon21113840