Frictional Games Forum (read-only)
Custom Sound & Music Help Needed - 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: Custom Sound & Music Help Needed (/thread-14402.html)

Pages: 1 2


Custom Sound & Music Help Needed - Kreekakon - 04-01-2012

Hey there all, I'm trying to put some custom sounds, and music into my story, but some sounds work just fine, while other just plain right refuse to appear. There's no error message, they just don't play.

For example, I'm trying to play a sound called arisiren. I've tried working it as both a sound, and as music, but neither work.

Here's my code, you can see multiple attempts at making the sound work in there:

Code:
////////////////////////////
// Run first time starting map
void OnStart()
{  

    PlaySoundAtEntity("", "airsiren.snt", "Player", 0, false);
    SetPlayerActive(false);
    SetPlayerCrouching(true);
    
    FadeOut(0);
    FadeIn(3);
    AddTimer("T1", 1, "Intro");
    AddTimer("T2", 3, "Intro");
    AddTimer("T3", 5, "Intro");
    AddTimer("T4", 7, "Intro");
    AddTimer("T5", 7.8, "Intro");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("airsiren.ogg", true, 100, 5, 0, true);
}
    void Intro(string &in asTimer)
    {
    string x = asTimer;
    if (x == "T1")
    {
        PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
        FadeOut(3);
    }
    else if (x == "T2")
    {
        FadeIn(3);
        PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
        PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
        StartPlayerLookAt("ScriptArea_1", 2, 2, "");
    }
    else if (x == "T3")
    {
        StopPlayerLookAt();
        StartPlayerLookAt("ScriptArea_2", 2, 2, "");
    }
    else if (x == "T4")
    {
        AddPlayerBodyForce(0, 0, 22300, false);
        StartPlayerLookAt("ScriptArea_3", 2, 2, "");
    }
    else if (x == "T5")
    {
        FadeOut(0.001);
        PlaySoundAtEntity("", "player_falldamage_max.snt", "Player", 0, false);
       
        StopMusic(2, 0);
    }
}


////////////////////////////
// Run when leaving map
void OnLeave()
{
}

My code seems fairly identical for the sounds that work, and ones that don't. Is it something with the sound files themselves, or something else?

Also, here's the tutorial I used: http://wiki.frictionalgames.com/hpl2/tutorials/script/page



RE: Custom Sound & Music Help Needed - flamez3 - 04-01-2012

Show the code inside the .snt file please.


RE: Custom Sound & Music Help Needed - Kreekakon - 04-01-2012

(04-01-2012, 09:12 AM)flamez3 Wrote: Show the code inside the .snt file please.
Done:
Code:
<SOUNDENTITY>
<SOUNDS>
   <Main>
      <Sound File="airsiren.ogg" />
       </Main>
   </SOUNDS>
   <PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
</SOUNDENTITY>




RE: Custom Sound & Music Help Needed - flamez3 - 04-01-2012

Try this:


<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="airsiren.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="4" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

And where are you putting these files?


RE: Custom Sound & Music Help Needed - Kreekakon - 04-01-2012

No, that code didn't work.

Well currently I'm stuffing them everywhere. For sound I have the .ogg, and .snt in two places:
/sound/extrasound
/sound

And for music, I have the .ogg in two places as well:
/music
/music/extramusic



RE: Custom Sound & Music Help Needed - flamez3 - 04-01-2012

Go:

Your Custom Story Name
|_ maps
|_sounds <---- put all .snt and .ogg's in there.


RE: Custom Sound & Music Help Needed - Kreekakon - 04-01-2012

Tried placing them there. Still didn't work unfortunately.



RE: Custom Sound & Music Help Needed - Xanthos - 04-01-2012

What did you use to convert the .ogg files?


RE: Custom Sound & Music Help Needed - Kreekakon - 04-01-2012

Goldwave; used it for several other custom sounds too. Some work, some don't.



RE: Custom Sound & Music Help Needed - Xanthos - 04-01-2012

I don't know what that is, so I probably won't be able to help.

But here's what I use.
I used FreeAudioConverter v5.2

Then I got sonyvegaspro 11
So i deleted the Audio Converter
Wait I got an idea.
Upload the sound file for .mp3 or .wma then I'll convert it then reupload it