Frictional Games Forum (read-only)

Full Version: SOLVED-What Causes Looping Sounds?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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" 
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.
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.
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