Hi all, I cannot seem to get this to work.
I have create the array:
public AudioClip gravel[];
Then I have this function to randomly play a clip from the array
void FootstepsGravel()
{
if (audio.isPlaying) return;
audio.clip = gravel[Random.Range(0,gravel.length)];
audio.Play();
}
This however doesn’t work as it says that I cannot index from this array.
I have tried a few things to get around this, but to be honest I am stuck, please can someone point out where I have gone wrong?