Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

Step Sound Help

$
0
0
Hi! I have been trying to make some simple step sounds for my game. I have tried IEnumerator, loops but nothing have worked! This is a simple cut version of the script. It still contains the more important things that you need to know. void Start () { StartCoroutine(StepSounds()); } IEnumerator StepSounds(){ while (step == true) { audio.PlayOneShot(stepSounds[Random.Range(0, stepSounds.Length)]); yield return new WaitForSeconds(nextStepSound); } } Please tell me what is wrong and what I need to do! And please post your answer in C#. Thanks

Viewing all articles
Browse latest Browse all 184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>