Keyboard to random sound???

Hi… so im having a problem in the game engine a can’t figure out. I’m trying to have it so that when i click a key (in this case “E”) it will randomly play one of 8 sounds I have… If someone could let me know that would be awesome :smiley: thanks
-Ross

Simply split it:

A) trigger logic that creates a random property
B) on key press trigger logic that plays sound depended on the property from A)

Between A) and B) can be any time as long as A) is performed before B)

Example:
Select random:



Play selected

Btw: You can do that with Python. The steps are the same. It would be less work if you want to add more sounds.

Thank you so much for replying so quickly!! I seem to be having problems though :stuck_out_tongue: ive copied everything you’ve described and shown but im not getting any sound to play… Ive attached the .blend file if you want to have a look at it. https://mega.co.nz/#!qQJBhDbB!8Xu6LUoerAl3sEXK3DDszcvag9WHun7W6iKKE1az20w I hate to ask you too… but if you could show me in python that would be awesome… Thanks
-Ross