Frictional Games Forum (read-only)
[SCRIPT] My sound keeps replaying itself once it is activated? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] My sound keeps replaying itself once it is activated? (/thread-10914.html)



My sound keeps replaying itself once it is activated? - flamez3 - 10-22-2011

When ever I activate the sound (through callback) it always plays back. I've gone in the snt file and disabled the loop by setting it to "false". I've even tried to stop the sound alltogether using the script "StopSound(string& asSoundName, float afFadeTime);"


But it still keeps on playing... Here is my snt regarding the sounds.


Sound 1:


Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="I_told_you.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="10" MaxDistance="30" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="false" Use3D="False" Blockable="False" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>[/code]




Sound 2:



Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="fault.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="10" MaxDistance="30" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="false" Use3D="False" Blockable="False" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>



RE: My sound keeps replaying itself once it is activated? - ggstarfoxxie - 10-22-2011

You should try to capitalize the false. I know I've had plenty of issues where stuff wouldn't work not just in .snt's, but in general scripting as well.



RE: My sound keeps replaying itself once it is activated? - SonOfLiberty796 - 10-22-2011

Yeah, the "false" should be "False". That's how sensitive scripting is -__-