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
My music doesn't work, please help.
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#1
My music doesn't work, please help.

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()
{
}

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
04-16-2012, 08:58 PM
Find
TFEF Offline
Member

Posts: 143
Threads: 0
Joined: Feb 2011
Reputation: 1
#2
RE: My music doesn't work, please help.

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.

My YouTube Channel - Filled with gaming videos and LP's.
Steam ID: TheTFEF
04-16-2012, 09:01 PM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#3
RE: My music doesn't work, please help.

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.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
04-16-2012, 09:35 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#4
RE: My music doesn't work, please help.

Download Audacity. You can change from .mp3 to .ogg and its' free.

Ba-da bing, ba-da boom.
04-16-2012, 09:46 PM
Find




Users browsing this thread: 1 Guest(s)