Ok so basically i want to play this reload sound file based on how many times the person have to reload a shotgun. So if the player shot like 5 times it will play this audio 5 times when the user press R to reload. How will I be able to do this? I know about audio.PlayOneShot(audiofile); but like how can i put a integer on to the audio to play it like 5 times or whatever?
Something like this in Javascript:
var i : int;
for(i = 0; i < numShots; i++)
{
audio.PlayOneShot(audiofile);
yield WaitForSeconds (numberOfSecondsOfAudioFile);
}
ReloadGun();