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
Custom sounds don't work.
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#1
Custom sounds don't work.

They just won't, even when I use the sound files that are already in-game or when I use an exactly same script from the game files.

Here's one of the many (raining.snt)

<SOUNDENTITY>
  <SOUNDS>
      <Main>
          <Sound File="general_rain.ogg" />
      </Main>
  </SOUNDS>
  <PROPERTIES Volume="1" MinDistance="8" MaxDistance="20" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="True" Loop="True" Use3D="True"
              Blockable="false" BlockVolumeMul="0.7" Priority="1" />
</SOUNDENTITY>

void OnStart()
{
    PlaySoundAtEntity("", "raining.snt", "rainsound", 1, true);
}
(This post was last modified: 08-08-2013, 05:35 PM by Rapsis.)
08-08-2013, 05:34 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#2
RE: Custom sounds don't work.

The third string in your script is "rainsound"

Is that an entity in your map? Because that's where you put the entity the sound plays at. Try changing that to "Player" and see if it works.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
08-08-2013, 05:39 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#3
RE: Custom sounds don't work.

(08-08-2013, 05:39 PM)DeAngelo Wrote: The third string in your script is "rainsound"

Is that an entity in your map? Because that's where you put the entity the sound plays at. Try changing that to "Player" and see if it works.

I'm not that stupid, I've been messing around with this shit for at least 6 hours now. No, player doesn't work.
08-08-2013, 05:42 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#4
RE: Custom sounds don't work.

You'd be surprised how often the simple solution ends up being the right one. It could be an engine-related issue. Someone else should be able to help you, we got some geniuses here. And I wasn't implying you were stupid. We all make mistakes and frankly anyone who claims they coded an entire custom story with nary a script error is a liar Smile

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
08-08-2013, 06:08 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#5
RE: Custom sounds don't work.

(08-08-2013, 06:08 PM)DeAngelo Wrote: You'd be surprised how often the simple solution ends up being the right one. It could be an engine-related issue. Someone else should be able to help you, we got some geniuses here. And I wasn't implying you were stupid. We all make mistakes and frankly anyone who claims they coded an entire custom story with nary a script error is a liar Smile

Yeah, sorry, it's just that I've literally tried every single combination between the .hps and the .snt file, and didn't find any way to make it work right. It's very annoying, and currently, I'm pretty mad.
(This post was last modified: 08-08-2013, 06:16 PM by Rapsis.)
08-08-2013, 06:15 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#6
RE: Custom sounds don't work.

(08-08-2013, 06:15 PM)Rapsis Wrote:
(08-08-2013, 06:08 PM)DeAngelo Wrote: You'd be surprised how often the simple solution ends up being the right one. It could be an engine-related issue. Someone else should be able to help you, we got some geniuses here. And I wasn't implying you were stupid. We all make mistakes and frankly anyone who claims they coded an entire custom story with nary a script error is a liar Smile

Yeah, sorry, it's just that I've literally tried every single combination between the .hps and the .snt file, and didn't find any way to make it work right. It's very annoying, and currently, I'm pretty mad.

I once spent 3 days trying to get a monster to walk across a room. Dunno if it'll help, but here's the snt of one of my custom sounds. You can see if any of the differences between mine and yours matter. Also you could upload your snt file as well as the .ogg file it goes to and let someone test it, that way you'd know for sure if it's the sound file itself or something messed up with your engine.

<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="moonlight.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="0.1" MaxDistance="50" Random="1" Interval="0" FadeEnd="true" FadeStart="False" Stream="false" Loop="true" Use3D="True" Blockable="false" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
08-08-2013, 08:52 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#7
RE: Custom sounds don't work.

(08-08-2013, 06:08 PM)DeAngelo Wrote: I once spent 3 days trying to get a monster to walk across a room. Dunno if it'll help, but here's the snt of one of my custom sounds. You can see if any of the differences between mine and yours matter. Also you could upload your snt file as well as the .ogg file it goes to and let someone test it, that way you'd know for sure if it's the sound file itself or something messed up with your engine.

<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="moonlight.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="0.1" MaxDistance="50" Random="1" Interval="0" FadeEnd="true" FadeStart="False" Stream="false" Loop="true" Use3D="True" Blockable="false" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

The .ogg file is actually taken from the main game, I simply want to change the .snt file so it would be silenter. It doesn't matter what the settings are, if I made the file, it won't work. Still, here:


Attached Files
.rar   sounds.rar (Size: 160.3 KB / Downloads: 176)
(This post was last modified: 08-08-2013, 09:43 PM by Rapsis.)
08-08-2013, 09:42 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#8
RE: Custom sounds don't work.

Quick question - Are there any other sounds playing at the time? Any music or other sounds in the environment?

And a suggestion, try sticking the volume up to 10, priority to 0 and random 0

Assuming that doesn't work, try using the PlayMusic function to play just the .ogg, to check it's not a problem with the file itself

08-09-2013, 09:33 AM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#9
RE: Custom sounds don't work.

I've switched the development from my laptop to my stationary PC and now it's working fine. Thanks for the help guys!

Now, can someone help me out at making the same sound play at multiple entities? I'm horrible with variables, so I'm using
    PlaySoundAtEntity("", "raining.snt", "rainsound", 1, true);    PlaySoundAtEntity("", "raining.snt", "rainsound_1", 1, true);    PlaySoundAtEntity("", "raining.snt", "rainsound_2", 1, true);    PlaySoundAtEntity("", "raining.snt", "rainsound_3", 1, true);    PlaySoundAtEntity("", "raining.snt", "rainsound_4", 1, true);
But it only plays the sound at the first entity.
(This post was last modified: 08-09-2013, 07:37 PM by Rapsis.)
08-09-2013, 07:23 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#10
RE: Custom sounds don't work.

Help? :S
08-09-2013, 10:40 PM
Find




Users browsing this thread: 1 Guest(s)