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
Unexpected end of file crash
Lleviathyn Offline
Member

Posts: 63
Threads: 3
Joined: Mar 2013
Reputation: 2
#4
RE: Unexpected end of file crash

Yeah, that's what I assumed.

Anyways, the whole script:
void OnStart()
{
    WakeUp();
    SetPlayerLampOil(0);
    SetWheelStuckState("burner", 2, false);
    AddUseItemCallback("", "crowbar", "kitchen_door", "UsedCrowbarOnDoor", true);
    AddUseItemCallback("", "jar_mix", "PlaceJarArea", "PlaceJar", true);
    AddUseItemCallback("", "heated_jar", "PlaceJarArea2, "PlaceJar2", true);
    SetEntityConnectionStateChangeCallback("burner", "LightBurner");
    AddEntityCollideCallback("crowbar_joint", "break_door_script", "CollideAreaBreakDoor", true, 1);
    AddEntityCollideCallback("Player", "curequest_area", "CureMemento", true, 1);
}

void OnEnter()
{
    PlayMusic("25_amb.ogg", true, 1.0f, 5, 0, true);
    SetMapDisplayNameEntry("00_hub.map");
}

void WakeUp()
{
    FadeOut(0);
    FadeIn(20);
    PlayGuiSound("player_cough.snt", 1.0f);
    FadeImageTrailTo(2, 2);
    SetPlayerActive(false);    
    FadePlayerRollTo(50, 220, 220);
    FadeRadialBlurTo(0.15, 2);
    SetPlayerCrouching(true);
    SetInventoryDisabled(true);
    AddTimer("trig1", 3.0f, "Recover");
}

void Recover(string &in asTimer)
{
    ChangePlayerStateToNormal();
    SetPlayerActive(true);
    FadePlayerRollTo(0, 33, 33);
    FadeRadialBlurTo(0.0, 1);
    SetPlayerCrouching(false);
    SetInventoryDisabled(false);
    FadeImageTrailTo(0,1);
}

void CrowbarHint(string &in entity)
{
    if(GetSwingDoorLocked("kitchen_door") == true)
    {
        SetMessage("Messages", "kitchen_door_hint", 0);
    }
}

void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
    AddTimer("", 0.2, "TimerSwitchShovel");
    RemoveItem("crowbar");
}

void TimerSwitchShovel(string &in asTimer)
{
    PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false);
    SetEntityActive("crowbar_joint", true);
}

void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorLocked("kitchen_door", false, true);
    AddPropImpulse("kitchen_door", 0, 0, -50, "World");
    SetSwingDoorDisableAutoClose("kitchen_door", true);
    SetSwingDoorClosed("kitchen_door", false, false);
    SetMoveObjectState("kitchen_door", 1);
    PlaySoundAtEntity("","break_wood_metal", "door_break_effect", 0, false);
    CreateParticleSystemAtEntity("", "ps_hit_wood", "door_break_effect", false);
    SetEntityActive("crowbar_joint", false);
    SetLocalVarInt("Door", 1);
}

void CureMemento(string &in asParent, string &in asChild, int alState)
{
    AddQuest("curequest", "CureQuest");
}

void PlaceJar(string &in asParent, string &in asChild)
{
    SetEntityActive("unfinished_cure_1", true);
    StartPlayerLookAt("unfinished_cure_1", 1.0, 1.0, "");
    RemoveItem("jar_mix");
    SetWheelStuckState("burner", 0, false);
    AddLocalVarInt("JarSet", 1);
    PlaySoundAtEntity("", "impact_glass_med.snt", "unfinished_cure_1", 0, false);
}

void LightBurner(string &in asEntity, int alState)
{
    if (alState == 1)
    {
        CreateParticleSystemAtEntity("burner1", "ps_fire_lab_burner.ps", "BurnerArea", false);
        PlaySoundAtEntity("IgniteSound", "general_fire_burning_low", "BurnerArea", 1, false);
        if (GetLocalVarInt("JarSet") == 1)
        {
            AddTimer("on", 3, "HeatedJar");
        }
    }
    if (alState == -1)
    {
        DestroyParticleSystem("burner1");
        StopSound("IgniteSound", 1);
        if (GetLocalVarInt("JarSet") == 1)
        {
            AddTimer("off", 3, "HeatedJar");
        }
    }
}

void HeatedJar(string &in asTimer)
{
    SetEntityActive("unfinished_cure_1", false);
    SetEntityActive("heated_jar", true);
    StopSound("IgniteSound", 1);
    DestroyParticleSystem("burner1");
    SetWheelStuckState("burner", 2, false);
}

void PlaceJar2(string &in asParent, string &in asChild)
{
    StartPlayerLookAt("unfinished_cure_2", 1.0, 1.0, "");
    RemoveItem("heated_jar");
    AddTimer("looking", 2.0, "LookJar");
}

void LookJar(string &in asTimer)
{
    SetEntityActive("unfinished_cure_2", true);
    StopPlayerLookAt();
    PlaySoundAtEntity("", "impact_glass_med.snt", "unfinished_cure_2", 0, false);
    AddUseItemCallback("", "sodamide", "funnel", "AddSodamide", true);
}

void AddSodamide(string &in asParent, string &in asChild)
{
    StartPlayerLookAt("unfinished_cure_2", 1.0, 1.0, "");
    RemoveItem("sodamide");
    AddTimer("looking2", 2.0, "LookJar2");
}

void LookJar2(string &in asTimer)
{
    SetEntityActive("unfinished_cure_2", false);
    StopPlayerLookAt();
    PlaySoundAtEntity("", "puzzle_add_chemical.snt", "cure", 0, false);
    AddTimer("pickitup", 2.0, "PickUpCure");
}

void PickUpCure(string &in asTimer)
{
    SetEntityActive("cure", true);
    StartPlayerLookAt("cure", 1.0, 1.0, "");
    AddTimer("stoplooking", 1.0, "StopCureLook");
    CompleteQuest("curequest", "CureQuest");
}

void StopCureLook(string &in asTimer)
{
    StopPlayerLookAt();
}
04-06-2013, 01:40 PM
Find


Messages In This Thread
Unexpected end of file crash - by Lleviathyn - 04-06-2013, 04:47 AM
RE: Unexpected end of file crash - by Statyk - 04-06-2013, 06:12 AM
RE: Unexpected end of file crash - by Lleviathyn - 04-06-2013, 01:40 PM
RE: Unexpected end of file crash - by Tiger - 04-06-2013, 02:06 PM
RE: Unexpected end of file crash - by Lleviathyn - 04-06-2013, 04:18 PM



Users browsing this thread: 1 Guest(s)