This is what I am using.
Syntax: Select all
import random
from engines.sound import Sound
from engines.sound import SOUND_FROM_WORLD
from stringtables.downloads import Downloadables
WCL_DOWNLOADS = Downloadables()
WCL_SOUNDS = ['WCL/DoubleKill1.mp3', 'WCL/DoubleKill2.mp3', 'WCL/TripleKill1.mp3', 'WCL/TripleKill2.mp3', 'WCL/QuadraKill.mp3', 'WCL/PentaKill1.mp3', 'WCL/FirstBlood.mp3', 'WCL/Shutdown.mp3']
WCL_DOUBLE_KILL = Sound((), SOUND_FROM_WORLD, random.choice(['WCL/DoubleKill1.mp3', 'WCL/DoubleKill2.mp3']))
WCL_TRIPLE_KILL = Sound((), SOUND_FROM_WORLD, random.choice(['WCL/TripleKill1.mp3', 'WCL/TripleKill2.mp3']))
WCL_QUADRA_KILL = Sound((), SOUND_FROM_WORLD, 'WCL/QuadraKill.mp3')
WCL_PENTA_KILL = Sound((), SOUND_FROM_WORLD, 'WCL/PentaKill1.mp3')
WCL_FIRST_KILL = Sound((), SOUND_FROM_WORLD, 'WCL/FirstBlood.mp3')
WCL_SHUT_DOWN = Sound((), SOUND_FROM_WORLD, 'WCL/Shutdown.mp3')
for sound in WCL_SOUNDS:
WCL_DOWNLOADS.add('sound/'+sound)
Then use:
Syntax: Select all
WCL_DOUBLE_KILL.play()
## etc