You just need to use
PlaySound and
Random.
It's easiest if the sounds you want to play are numbered consecutively (
sound1.mp3, sound2.mp3, sound3.ogg, etc) then you just need
PlaySound(4+Random(4));
Which'll select and play a random sound between 4 (4+0) and 8 (8+0). Or more generally:
PlaySound([number of first sound]
+ Random([number of possible sounds]
);If the sounds aren't consecutive, just set an
int to the random number and use a bunch of
if ... elses
int ToPlay = Random(4);
if (ToPlay == 0) PlaySound(27);
else if (ToPlay == 1) PlaySound(56);
//... Ect
Quote
Im sure its very easy to code but I just got to the point of learning to make one sound file play lol.
Yeah, this is pretty easy stuff, even if you are just starting out. Get comfortable with what you do know before How I figure things out is to just read through the manual and actually try things out - even if you can't get it working, you can show what you've tried which (when you get to more complicated stuff) might give people a better idea exactly what you're after. At least you won't be posting questions that you can answer yourself less than 10 minutes later... :)