How do i make a sound come randomly?

i want a sound to come randomly sometimes. If you ever played minecraft, when you are in the caves sometimes a scary sound comes. How do i make a sound come randomly?

Thx!

basically in unity use Invoke and InvokeRepeating to create simple timers. you can use one of the Random functions to make a random time. there are literally 100s of questions on this here, search. also unityGEMS.com for many beginner articles on it

1 Answer

1

Im not going to code an entire script for you , but i will give you some pointers, try these references 1 and other link