Frictional Games Forum (read-only)

Full Version: My music doesn't work, please help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sup guys, I'm making a custom story, and in this map I want to play different music. So I downloaded an .mp3 file, and switched it to .ogg file by simply changing the ending of it from "'music-name'.mp3" to "'music-name'.ogg." But when I try the map, the music just won't play. I'm getting irritated. If I did that the file-changing wrong, or if its any problems with my scripting, please tell me. Thank you.



//===========================================


//===========================================
// This runs when the map first starts
void OnStart()
{
FadeOut(0);
FadeIn(5.0);
AddEntityCollideCallback("Player", "FallArea", "fall", true, 1);
SetLanternDisabled(true);
SetPlayerActive(false);
ShowPlayerCrossHairIcons(false);
SetPlayerCrouching(true);
FadePlayerRollTo(50, 150, 150);
FadeRadialBlurTo(0.1, 0.4);
FadeImageTrailTo(2.0, 0.4);
FadeSepiaColorTo(100.0, 4.0);
AddTimer("", 5.0, "fade1");
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
PlaySoundAtEntity("ring", "insanity_ear_ring.snt", "Player", 12.0, false);
}


//COOL INTRO SHIT
void fade1(string &in asTimer)
{
FadeOut(2.0);
AddTimer("", 2.0, "fade2");
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
StopSound("ring", 5.0);
}


void fade2(string &in asTimer)
{
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
FadeIn(2.0);
AddTimer("", 2.0, "lookhere1");
StartPlayerLookAt("Look_here1", 2, 4, "");
}


void lookhere1(string &in asTimer)
{
FadeOut(2.0);
AddTimer("", 2.0, "fade3");
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
}


void fade3(string &in asTimer)
{
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
FadeIn(2.0);
AddTimer("", 2.0, "lookhere2");
}


void lookhere2(string &in asTimer)
{
StartPlayerLookAt("Look_here2", 4, 8, "");
AddTimer("", 2.0, "finishintro");
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
}


void finishintro(string &in asTimer)
{
SetPlayerActive(true);
ShowPlayerCrossHairIcons(true);
SetPlayerCrouching(false);
FadePlayerRollTo(0, 33, 33);
AddTimer("", 3.0, "finishpain");
StopPlayerLookAt();
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
}


void finishpain(string &in asTimer)
{
FadeRadialBlurTo(0.0, 1.0);
FadeSepiaColorTo(0.0, 25.0);
FadeImageTrailTo(0.0, 0.1);
}


void fall(string &in asParent, string &in asChild, int alState)
{
AddPlayerBodyForce(0, 0, 25000, false);
PlaySoundAtEntity("", "pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "player_falldamage_min.snt", "Player", 0, false);
SetPlayerCrouching(true);
SetPlayerMoveSpeedMul(1.0);
SetPlayerRunSpeedMul(1.0);
SetPlayerLookSpeedMul(1.0);
}


//===========================================
// This runs when the player enters the map
void OnEnter()
{
StopMusic(3,0);
PlayMusic("requiem_for_a_dream.ogg", true, 1.0, 0, 0, true);
SetPlayerMoveSpeedMul(0.5);
SetPlayerRunSpeedMul(0.5);
SetPlayerLookSpeedMul(0.5);
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}
Simply changing the extension will most likely not work. You should download a program like Audacity (which is FREE and very simple to use) if you want to convert music for your custom stories.
Of course it won't. An Mp3 file's is totally different from an .ogg file. you can't expect an .ogg codec to decode an mp3 file or w.e really happens.
Download Audacity. You can change from .mp3 to .ogg and its' free.