Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: sound loop script help
Sounds can be told to loop and chosen randomly through the .snt... For example, here is one from a breaking glass bottle:
//___________________________________
<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="break_glass_bottle1" />
<Sound File="break_glass_bottle2" />
<Sound File="break_glass_bottle3" />
<Sound File="break_glass_bottle4" />
<Sound File="break_glass_bottle5" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="4" MaxDistance="20" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="True" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>
//___________________________________
As you can see, the different sound files are stacked in the <Main> section. The snt will choose any of the 5 listed randomly on its own. You just have to tell the snt what sounds to look for (.ogg), as well choose between loop (bolded), true or false. (warning: setting it to TRUE will have the sound play repeatedly, with no pause in between. I suggest setting it to false and have it loop through a scripted timer)
|
|
01-02-2012, 01:29 AM |
|