Frictional Games Forum (read-only)

Full Version: Custom Sound & Music Help Needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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/tut...cript/page
Show the code inside the .snt file please.
(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>

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?
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
Go:

Your Custom Story Name
|_ maps
|_sounds <---- put all .snt and .ogg's in there.
Tried placing them there. Still didn't work unfortunately.
What did you use to convert the .ogg files?
Goldwave; used it for several other custom sounds too. Some work, some don't.
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
Pages: 1 2