The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
My music doesn't work, please help. - by Wapez - 04-16-2012, 08:58 PM
RE: My music doesn't work, please help. - by TFEF - 04-16-2012, 09:01 PM



Users browsing this thread: 1 Guest(s)