(09-22-2010, 04:07 PM)jens Wrote:  That function alone does not really do anything?
It only disables so that a door will not auto close when getting within a certain angle to being closed. 
So the only use this function really have is to be used together with other functions, like for example when trying push a door open with an impulse (if not using disable autoclose, the door would auto close again after impulse is given.).
That's what I'm trying to do. I have it set to unlock then open with a body impulse a few seconds later.
Edit: Here's the full timer if that helps.
    else if(child == "Slam1Timer")
    {
        AddTimer("Slam1", 0, "SlamDoor1Seq");
        AddTimer("Slam1Sound", 0.1, "SlamDoor1Seq");
        AddTimer("Slam1Look", 0.2, "SlamDoor1Seq");
        AddTimer("Slam1Lock", 0.5, "SlamDoor1Seq");
        AddTimer("Slam1NoAuto", 1, "SlamDoor1Seq");
        AddTimer("Slam1StopLook", 1, "SlamDoor1Seq");
        AddTimer("Slam1Unlock", 8, "SlamDoor1Seq");
        AddTimer("Slam1Open", 10, "SlamDoor1Seq");
    }
void SlamDoor1Seq (string &in asTimer)
{
    if (asTimer == "Slam1")
    {
        PlaySoundAtEntity("", "TensionTick","Player", 0, false);
        SetSwingDoorClosed("SlamDoor1", true, true);
    }
    else if (asTimer == "Slam1Sound")
    {
        AddPlayerBodyForce(6000*2.5f,6000,0, false);
        PlaySoundAtEntity("", "break_wood", "SlamDoor1", 0, false);
    }
    else if (asTimer == "Slam1Look")
    {
        StartPlayerLookAt("SlamDoor1", 5, 5, "");
        PlayGuiSound("react_scare.snt", 1);
    }
    else if (asTimer == "Slam1Lock")
    {
        SetSwingDoorLocked("SlamDoor1", true, true);
    }
    else if (asTimer == "Slam1StopLook")
    {
        StopPlayerLookAt();
    }
    else if (asTimer == "Slam1NoAuto")
    {
        SetSwingDoorDisableAutoClose("SlamDoor1", true);
    }
    else if (asTimer == "Slam1Unlock")
    {
        SetSwingDoorLocked("SlamDoor1", false, false);
    }
    else if (asTimer == "Slam1Open")
    {
        AddBodyImpulse("SlamDoor1_Body_1", -2, 0, 0, "World");
    }
}