Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


So I thought I knew it all...
NyteMyre Offline
Member

Posts: 70
Threads: 5
Joined: Nov 2010
Reputation: 0
#5
RE: So I thought I knew it all...

Took a look in the level editor and it seems it does spawn a fake water lurker after you break the pipe and your sanity is higher then 30% (which seems unlikely when you play normally I think)

/////////////////////////
// Break pipe piece
void CollidePipePieceWithBreakArea(string &in asParent, string &in asChild, int alState)
{
    ///////////////////////////////////////////
    // Check how many times the pipe has collided with area, and break if enough
    int lBreakAmount = GetLocalVarInt("PipeBreakAmount");
    if(lBreakAmount==2)
    {
        PlaySoundAtEntity("PipeBreak", "17_break_wheel.snt", asParent, 0.3f, false);
        PlaySoundAtEntity("PipeBreak2", "25_bar_drop.snt", asParent, 0, false);
        PlaySoundAtEntity("PipeBreak3", "impact_water_med.snt", asParent, 0, false);
        
        SetEntityActive(asParent, false);
        SetEntityActive("pipe_piece", true);
        RemoveEntityCollideCallback(asParent, asChild);
        
        CompleteQuest("20Pipe", "20Pipe");
        
        SetEntityActive("AreaScaryWaterLurkerEvent", true); //Activate a scary water lurker event.
    }
    else
    {
        lBreakAmount++;
        SetLocalVarInt("PipeBreakAmount", lBreakAmount);
    }
}

//////////////////////////
// WATER LURKER SCARE IN HALL 2
//////////////////////////

//------------------------------------------------------

void CollideScaryWaterLurkerEvent(string &in asParent, string &in asChild, int alState)
{
    if(GetPlayerSanity()>=30)
        return;
        
    PlayMusic("04_event_stairs.ogg", false, 0.7, 0.1, 10, false);
    
    AddTimer("scare", 0.7f, "TimerPlayerReact");
    AddTimer("breath", 2.7f, "TimerPlayerReact");
    AddTimer("breathl", 4.7f, "TimerPlayerReact");
    
    AddTimer("AreaLurkerSound", 0.5f, "TimerLurkerSplash");
    AddTimer("AreaLurkerSplash_1", 1.0f, "TimerLurkerSplash");
    AddTimer("AreaLurkerSplash_2", 2.2f, "TimerLurkerSplash");
    AddTimer("AreaLurkerSplash_3", 3.0f, "TimerLurkerSplash");
    AddTimer("AreaLurkerSplash_4", 3.5f, "TimerLurkerSplash");
    AddTimer("AreaLurkerSplash_5", 4.0f, "TimerLurkerSplash");
    
    RemoveEntityCollideCallback(asParent, asChild);
}

//------------------------------------------------------

void TimerLurkerSplash(string &in asTimer)
{
    if(asTimer == "AreaLurkerSound"){
        PlaySoundAtEntity("LurkerSound","water_lurker_hunt.snt", "AreaLurkerSplash_1", 0, false);
        GiveSanityDamage(10.0f, true);
        StartScreenShake(0.003f, 0.0f, 0.5f, 3.0f);
        
    }else{
    
        PlaySoundAtEntity("LurkerSound","impact_water_high.snt", asTimer, 0, false);
        CreateParticleSystemAtEntity("LurkerPS", "waterlurker_walk_splash", asTimer, false);    
    }
    
    if(asTimer == "AreaLurkerSplash_5")
        PlaySoundAtEntity("LurkerSound2","water_lurker_eat.snt", asTimer, 0, false);
}


It also seems the only map where something is happening based on your insanity. I checked all other map-scripts and none other then Sewers has a line like "if(GetPlayerSanity()>"

-edit-
never mind, with just "if(GetPlayerSanity()" i get more results. Seems like the waterlurker in the Cistern also spawns only on high insanity levels
(This post was last modified: 01-18-2011, 03:03 AM by NyteMyre.)
01-18-2011, 02:46 AM
Find


Messages In This Thread
So I thought I knew it all... - by NyteMyre - 01-10-2011, 10:48 PM
RE: So I thought I knew it all... - by Shev - 01-11-2011, 12:02 AM
RE: So I thought I knew it all... - by NyteMyre - 01-18-2011, 02:46 AM
RE: So I thought I knew it all... - by dmdmdm - 01-27-2011, 10:29 PM



Users browsing this thread: 1 Guest(s)