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:
////////////////////////////
// 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