Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help SOLVED-What Causes Looping Sounds?
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#1
SOLVED-What Causes Looping Sounds?

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.

    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?

(This post was last modified: 03-27-2014, 07:34 PM by MsHannerBananer.)
03-27-2014, 10:21 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: What Causes Looping Sounds?

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: (Select All)
Loop="False" 

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 03-27-2014, 11:35 AM by Romulator.)
03-27-2014, 11:16 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: What Causes Looping Sounds?

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.

03-27-2014, 03:00 PM
Find
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#4
RE: What Causes Looping Sounds?

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.

03-27-2014, 07:33 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: SOLVED-What Causes Looping Sounds?

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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-27-2014, 09:16 PM
Find




Users browsing this thread: 1 Guest(s)