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
How to make more than 1 script?
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#5
RE: How to make more than 1 script?

It's late and I had more to say but I just rewrote the script so it should work...

//I'm guessing this is called after picking up a key or something?
void DoggyAttackPart(string &in asEntity, string &in type)
{
    SetEntityActive("doggy", true);
    StartPlayerLookAt("doggy", 15, 15, "");
    AddTimer("monstertimer", 2, "monstertimer");
    ShowEnemyPlayerPosition("doggy");
}

void monstertimer(string &in asTimer)
{
    StopPlayerLookAt();
}

void scare_script(string &in asParent, string &in asChild, int alState)
{
    //music scripts here
    // If enters and leave
    if(alState == 1)
    {
        PlayMusic("Penumbra_BP_C1.ogg", false, 1.00, 0, 5, true);
    }
    if(alState == -1)
    {

    }
} // error was here, you forgot to add this end bracket

void OnStart()
{
    //////// callbacks go here
    AddEntityCollideCallback("Player", "scare_script", "scare_script", false, 0);
}

void OnEnter()
{
    PlayMusic("penumbra_music_E1_D1", true, 1, 0, 0, true);
}

void OnLeave()
{

}

06-03-2012, 06:52 AM
Find


Messages In This Thread
RE: How to make more than 1 script? - by Bridge - 06-02-2012, 11:42 PM
RE: How to make more than 1 script? - by palistov - 06-02-2012, 11:53 PM
RE: How to make more than 1 script? - by Bridge - 06-02-2012, 11:56 PM
RE: How to make more than 1 script? - by Putmalk - 06-03-2012, 06:52 AM



Users browsing this thread: 1 Guest(s)