Assuming you have created the area and the callback for entering into the area.
GetSwingDoorClosed() will return a true or false when you use it, so if you do:
//Player enters the area, we check if door is closed or open
void ColliderPlayerInArea(CAN'T RECALL ALL THE STUFF THAT GOES HERE)
{
//Door is closed so we will creak it open
if(GetSwingDoorClosed("NameOfDoor") == true)
CreakOpen();
//Door is open so we will slam it shut, this is easy.
else
SetSwindDoorClosed("NameOfDoor", true, true);
}
//Door was closed, so we add a bunch of timers to give a small amount of force,
//creaking the door open after we disabled some stuff that would interfer
void CreakOpen()
{
SetSwingDoorDisableAutoClose("NameOfDoor", true);
SetSwingDoorClosed("NameOfDoor", false, false);
AddTimer("NameOfDoor", 0.05f, "TimerCreakDoor");
AddTimer("NameOfDoor", 0.1f, "TimerCreakDoor");
AddTimer("NameOfDoor", 0.2f, "TimerCreakDoor");
AddTimer("NameOfDoor", 0.3f, "TimerCreakDoor");
}
//The timer that gives the door a little push, notice that I do not know what a good
//force value is 1 might be too much or too little, and I am not sure of the direction
//so could be -1 or on the Z axis and not on the X axis as in this script.
void TimerCreakDoor(string &in asTimer)
{
AddPropForce(asTimer, 1, 0, 0, "World");
}