For example each time an event happens play a random sound from a list or folder. Can this be done?
Ooops wrong forum.
Sure....put the name of the soundfiles in an array, so they are mapped to numbers and then use the random statement to select one of the array cells.
or use the choose() function
Audio: Play choose("bird","duck","cat","tiger") from Sounds (tag "animal")
you again <img src="smileys/smiley20.gif" border="0" align="middle" />
Great one Yann, Choose is super easy to use. I took a bit to realize where to place it (works fine under Audio File Name, Play(by name))
<img src="http://img252.imageshack.us/img252/5544/chooseaudio.png" border="0" />
Develop games in your browser. Powerful, performant & highly capable.
Excellent!
Yann > I love you !! help a lot! EVER!
Thanks! <img src="smileys/smiley31.gif" border="0" align="middle" />
oh, awesome =P been wondering how to do this for some time now.
Is there an example with the array?
I dont want to manually write in 100 small sounds filenames in Choose..