Frictional Games Forum (read-only)

Full Version: Making a door creek open script. Help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I relay want to know how to creek open a door slowly like in the first level of amnesia.
This is my script so far but it does not have any effects on the door.
////////////////////////


void OnStart()

{
AddEntityCollideCallback("Player", "opendoor", "opendoorfunc", true, 1);

}

void opendoorfunc(string &in asParent, string &in asChild, int alState)


{
SetSwingDoorClosed("cellar_wood01_slow_1", false, false);
AddPropForce("cellar_wood01_slow_1", 90, 0, 0, "world");
}

If anyone like to help me out on this or know how to creek open a door, just like on the first level of amnesia please let me know. Thanks!
You're doing the right thing, just keep tweaking the prop force to get the effect you wanted.


Try this. Helps?


Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "opendoor", "opendoorfunc", true, 1);
}

void opendoorfunc(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorDisableAutoClose("cellar_wood01_slow_1", true);
SetSwingDoorClosed("cellar_wood01_slow_1", false, false);
AddPropForce("cellar_wood01_slow_1", 90, 0, 0, "world");
}

Thank you Unearthlybrutal. Oddly enough I had to set it all to 290, on XY and Z. Still I got the door to creek open. Thanks!