|
I'm very new to coding, and I'm having problems setting my code to play only on the first collision with the box collider. Here's the code so far. var Sound : AudioClip; audio.loop = false; function OnTriggerEnter(){ audio.PlayOneShot(Sound); } I've been told to set the variable as a boolean that sets it to play only on the initial collision, but all the help that's available online is concerning things logging in, rather than this. Any help would be wholeyl appreciated, thanks very much
(comments are locked)
|
|
As being said, add a boolean to test against. Hey Piflik, That works perfectly, thanks very much. I'm learning more and more about this as this project goes on. Thanks
May 13 '12 at 10:47 PM
Vial
(comments are locked)
|
