void InteractCrank(string &in asEntity)
{
    AddQuest("TouchCrank", "TouchCrank");
}
void Test1(string &in asItem, string &in asEntity)
{
    SetPlayerActive(false);
    SetEntityActive("stone_hammer_move_1", true);
    
    SetMoveObjectState("stone_hammer_move_1", 0.25f);
    SetEntityInteractionDisabled("Crank", true);
    
    AddTimer("1", 0.2f, "TimerHammer");
    AddTimer("2", 0.6f, "TimerHammer");
    AddTimer("3", 0.8f, "TimerHammer");
    AddTimer("4", 1.2f, "TimerHammer");
    AddTimer("5", 1.4f, "TimerHammer");
}
void TimerHammer(string &in asTimer)
{
    if(asTimer == "1"){
        PlaySoundAtEntity("bang", "impact_wood_med", "Player", 0, false);
        CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Crank", false);
        SetMoveObjectState("stone_hammer_move_1", 0.0f);
    }
    if(asTimer == "2"){
        SetMoveObjectState("stone_hammer_move_1", 0.25f);
    }
    if(asTimer == "3"){
        SetMoveObjectState("stone_hammer_move_1", 0.0f);
        CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Crank", false);
        PlaySoundAtEntity("bang", "impact_wood_med", "Player", 0, false);
    }
    if(asTimer == "4"){
        SetMoveObjectState("stone_hammer_move_1", 0.25f);
    }
    if(asTimer == "5"){
        SetEntityActive("stone_hammer_move_1", false);
        PlaySoundAtEntity("bang", "impact_rock_high", "Player", 0, false);
        CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Crank", false);
        CompleteQuest("TouchCrank", "TouchCrank");
        
        GiveSanityBoostSmall();
        SetWheelStuckState("Crank", 0, true);
        SetEntityInteractionDisabled("Crank", false);
        SetPlayerActive(true);
        PlayMusic("23_puzzle.ogg", false, 0.7f, 0.5f, 9, false);
        SetInventoryDisabled(true); //This is so the music doesnt drag on by having this up
        AddTimer("music", 4.0f, "TimerMusic");
        AddTimer("inventory", 6.0f, "TimerMusic");
    }
}
void TimerMusic(string &in asTimer)
{
    if(asTimer == "music"){
        StopMusic(4.0f, 9);
        return;
    }
    
    SetInventoryDisabled(false);
}
//If ladder if in this area, turn off ladder area. Else, allow player to climb it
void CollideCheckLadder(string &in asParent, string &in asChild, int alState)
{
 if(alState == -1){
  SetEntityActive("LadderArea_1", true);
 }
 
 if(alState == 1){
  SetEntityActive("LadderArea_1", false);
 }
}
void CollideAreaLook(string &in asParent, string &in asChild, int alState)
{
    StartPlayerLookAt("LadderPuzzle", 1.0, 1.0, "Function");
    AddTimer("LaderPuzzle", 4, "Function");
}
void Function(string &in asTimer)
{
    StopPlayerLookAt();
    
}
void TimerAreaStep(string &in asTimer)
{
    int iRand = RandInt(1, 2);
    PlaySoundAtEntity(asTimer+iRand, "scare_wood_creak_scuf.snt", asTimer+iRand, 1, false);
    SetRadialBlurStartDist(0.8f);
    FadeRadialBlurTo(0.1f, 0.03f);
    AddTimer("EndRadial", 4.0f, "TimerEndRadial");
    AddTimer(asTimer, RandFloat(15.0f, 30.0f), "TimerAreaStep");
}