|
Kaotac Beginner
Joined: 26 Mar 2007 Posts: 16 Location: Australia
|
Posted: Sun Jan 06, 2008 12:49 am
#playing random sounds? |
Is it possible to set a trigger to #play a random sound from a list?
Would it be something like #play {num1.wav|num2.wav|num3.wav}
Or like #play %random num1.wav|num2.wav|num3.wav
Also, will Zmud play .ogg files? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Jan 06, 2008 1:11 am |
Yes, use #case or %case with %random as a value for the number. For example:
#play %case(%random,num1.wav,num2.wav,num3.wav)
As for ogg files, I believe it can play anything you have a codec for, but the easiest way to find out is to try it and see. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jan 06, 2008 6:34 am |
Or, as I've suggested in the past...
#VAR sounds {num1.wav|num2.wav|num3.wav}
#ALIAS addsound {#additem sounds {%1}}
#play %item(@sounds, %random(1, %numitems(@sounds)))
That way, when you have another sound to add, you don't have to edit the trigger, just type "addsound num4.wav" and everything will be set up correctly.
Charneus |
|
|
|
|
|