|
Xolademoness Wanderer
Joined: 18 Jun 2004 Posts: 73 Location: United Kingdom
|
|
_________________ mhm.. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Sep 05, 2007 12:41 pm |
Use #case or %case. You code could look something like this:
#case %random {#play one.wav} {#play two.wav}
or
#play %case(%random,one.wav,two.wav) |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed Sep 05, 2007 4:53 pm |
Couldn't it also be done by putting all the sounds in a variable, then using %item? For example:
Code: |
#VAR soundlist {one.wav|two.wav|three.wav|four.wav|five.wav}
#TRIGGER {Your trigger here.} {#play %item(@soundlist, %random(1,%numitems(@soundlist)))} |
I suggest this way so you don't have to continue to edit the trigger each time you get a new sound. All you have to do is:
Code: |
#ADDITEM soundlist {six.wav} |
and the trigger would now include the sixth sound file for consideration. Just a thought. Correct me if I'm wrong.
Charneus |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Sep 05, 2007 9:18 pm |
That's a better way to run an item from an varying list, you're right. I should've mentioned that :)
|
|
|
|
|
|