Frictional Games Forum (read-only)
[SCRIPT] SOLVED-What Causes Looping Sounds? - 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] SOLVED-What Causes Looping Sounds? (/thread-24933.html)



SOLVED-What Causes Looping Sounds? - MsHannerBananer - 03-27-2014

I have a script set up for two sounds to be played at an entity when a lever is pulled down.

Instead of playing once, both sounds loop continuously.

Code:
    PlaySoundAtEntity("", "powerdown.snt", "marineSwitch", 0.05, false);
    PlaySoundAtEntity("", "lever_switch.snt", "marineSwitch", 0.05, false);

It doesn't matter if the sounds are .ogg or .snt, they both behave the same way and I can't find the reason for it for the life of me.

I've never had this happen before with PlaySound. All my other PlaySound's behave as they're supposed to.

Anyone have any idea's?


RE: What Causes Looping Sounds? - Romulator - 03-27-2014

Since the .snt file is just a text document which just has a bunch of variables in it, feel free to open it up and edit some of the properties using something like Notepad or yeah.

An example of one is this:
amb_eerie_dunk.snt Wrote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="amb_eerie_dunk" />
</Main>
</SOUNDS>
<PROPERTIES Volume="0.5" MinDistance="20" MaxDistance="30" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="True" Loop="True" Use3D="False" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

One of the variables in there is Loop. Make sure that is set as False Smile
PHP Code:
Loop="False" 



RE: What Causes Looping Sounds? - Mudbill - 03-27-2014

Adding to what Rom said, you can always duplicate the .snt and paste it in your CS folder. But I'm guessing this is for your mod? Well, same thing. You probably don't wanna edit the original files, but you can make a copy that does the exact same except it doesn't loop.


RE: What Causes Looping Sounds? - MsHannerBananer - 03-27-2014

Omg. I never even thought of that!

Low and behold it worked. God I feel dumb. Haha. Thank you guys so much. I can't believe how simple that was, I kinda feel like an idiot, haha.


RE: SOLVED-What Causes Looping Sounds? - Romulator - 03-27-2014

Don't feel dumb Hannah Smile We'll try our best to help, even if its the simplest of things, that's what we are here for. Whether you feel like an idiot or not after we have helped, just remember that you learnt how to do something else, and that you're smarter now. Smile Optimism ^.^

But if you need more help, just ask here Smile