Is there way to have my FPS player play random audio clips whenever he kills and enemy? I was thinking something along the lines of the old Duke Nuke em games where sometimes he would say "That's Gotta Hurt"
"Id buy that for a Dollar"
I was up late last night trying to figure out how something like that could be done but I'm still trying to wrap my head around this script stuff.
asked Mar 24 '11 at 02:24 AM
Psuedo: Have an array of sounds... Or a List as people here like more.. W/e it's the same.
Get a random number in the array, each array spot has its own sound, so if you have 10, get a number between 1 and 10, and then play that when you kill someone... That make sense? So every kill, it gets a new number, which is a "new" sound...
answered Mar 24 '11 at 02:32 AM
Try this it works for me :
it was similar to Fierce Waffle answer mines basically plays when you click on the GUI button :)
answered Apr 17 '11 at 06:03 PM
I would go with a random number generating system and have different voices for different numbers. I'm not exactly and expert when it comes to random generating but I got the idea from DOS. How in dos many games were random. but here's a little snip it of what
answered Mar 24 '11 at 08:22 AM
create an audio array. and pretend your when your player dies you call this function
answered Mar 24 '11 at 09:15 AM