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
Introduction music won't stop
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#1
Sad  Introduction music won't stop

As the title says, i'm a big phat phony who's stuck again.

void OnStart()
{

FadeOut(0);

AddTimer("", 4, "intro1");

AddEntityCollideCallback("Player", "WakeUpSpeech", "WakeUpSpeechFunc", true, 1);
}


void intro1(string &in asTimer)
{
SetMessage("Messages", "Introtext1", 5);

AddTimer("", 6, "intro2");

PlayMusic("Introduction.ogg", true, 1.0f, 0, 0, true);
}

void intro2(string &in asTimer)
{
SetMessage("Messages", "Introtext2", 5);

AddTimer("", 6, "intro3");
}

void intro3(string &in asTimer)
{
FadeIn(2);

AddTimer("", 1, "musicstart");
}

void musicstart(float afFadeTime, int alPrio)
{
AddTimer("", 4, "ambientstart");

PlayMusic("Ambient_Ghost.ogg",true,1,0,0,false);

StopMusic(0, 0);

}


void ambientstart(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WakeUpSpeech", true);
}


void WakeUpSpeechFunc(string &in asChild, string &in asParent, int alState)
{
AddEffectVoice("ItsQuiet.ogg","","Voice","ItsQuiet",false,"",0,10);
}

Hi.
(This post was last modified: 06-26-2012, 07:34 PM by MaZiCUT.)
06-26-2012, 07:23 PM
Website Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#2
RE: Introduction music won't stop

void musicstart(float afFadeTime, int alPrio)
wrong callback syntax, it's
void MyFunc(string &in asTimer)

Edit:
PlayMusic("Ambient_Ghost.ogg",true,1,0,0,false);
It has the same priority, so it will either bug out or won't play at all, since priority 0 is stopped right after. Better change it
(This post was last modified: 06-26-2012, 07:33 PM by Cruzore.)
06-26-2012, 07:31 PM
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#3
RE: Introduction music won't stop

Thank you dear sir, it is working.

Hi.
06-26-2012, 07:34 PM
Website Find




Users browsing this thread: 1 Guest(s)