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
Script Help Triggers not resetting
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#3
RE: Triggers not resetting

Sure thing!

void OnEnter ()
{
        AddEntityCollideCallback("Player", "Wakeupscript", "Wakeupscript", true, 1);
        AddEntityCollideCallback("Player", "Levelchange_1", "Levelchange", true, 1);
        AddEntityCollideCallback("Player", "NoScare", "NoScare", true, 1);
        AddEntityCollideCallback("Player", "SprintDisable", "NoSprint", true, 1);
        AddEntityCollideCallback("Player", "SprintEnable", "Sprint", true, 1);
        AddEntityCollideCallback("Player", "StandKill", "KillStand", true, 1);
}
void Wakeupscript(string &in asParent, string &in asChild, int alState)
{
        SetLanternDisabled(true);
        SetPlayerActive(false);
        SetPlayerCrouching(true);
        FadeOut(1.0f);
        PlayMusic("Map1Ambiance.ogg", true, 100, 1, 0, false);
        FadePlayerRollTo(50, 33, 33);
        AddTimer("", 10, "Rollback");
        SetPlayerSanity(10);
        SetPlayerMoveSpeedMul(0.5);
        SetPlayerLookSpeedMul(0.5);
}
void Rollback(string &in asTimer)
{
        SetPlayerActive(true);
        FadeIn(10.0f);
        FadePlayerRollTo(0, 33, 33);
        CheckPoint ("Check1", "BridgeDeathRespawn", "BridgeDeath", "DeathHints", "StayLow");
}
void Levelchange(string &in asParent, string &in asChild, int alState)
{
        FadeOut(1.0f);
        AddTimer("", 1.0f, "Change");
}
void Change(string &in asTimer)
{
        ChangeMap("map02.map", "PlayerStartArea_1", "", "");
}
void NoScare(string &in asParent, string &in asChild, int alState)
{
        PlaySoundAtEntity("", "03_no.snt", "Levelchange_1", 0, true);
        StartPlayerLookAt("Levelchange_1", 2, 2, "");
        AddTimer("", 5, "Away");
}
void Away(string &in asTimer)
{
        StopPlayerLookAt();
}
void NoSprint(string &in asParent, string &in asChild, int alState)
{
        SetPlayerRunSpeedMul(0);
}
void Sprint(string &in asParent, string &in asChild, int alState)
{
        SetPlayerRunSpeedMul(1);
        GiveSanityBoost();
}
void KillStand(string &in asParent, string &in asChild, int alState)
{
        SetPlayerHealth(0);
}
void BridgeDeath(string &in asName, int alCount)
{
        SetEntityActive("SprintDisable", true);
        SetEntityActive("SprintEnable", true);
        SetEntityActive("StandKill", true);
}
void OnLeave ()
{
}

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-08-2012, 09:10 PM
Website Find


Messages In This Thread
Triggers not resetting - by JetlinerX - 04-08-2012, 09:00 PM
RE: Triggers not resetting - by Apjjm - 04-08-2012, 09:08 PM
RE: Triggers not resetting - by JetlinerX - 04-08-2012, 09:10 PM
RE: Triggers not resetting - by Apjjm - 04-08-2012, 09:17 PM
RE: Triggers not resetting - by JetlinerX - 04-08-2012, 09:27 PM



Users browsing this thread: 1 Guest(s)