Frictional Games Forum (read-only)
Making a door creek open script. Help! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Making a door creek open script. Help! (/thread-11540.html)



Making a door creek open script. Help! - jssjr90 - 11-27-2011

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!


RE: Making a door creek open script. Help! - Khyrpa - 11-27-2011

You're doing the right thing, just keep tweaking the prop force to get the effect you wanted.



RE: Making a door creek open script. Help! - Unearthlybrutal - 11-27-2011



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");
}




RE: Making a door creek open script. Help! - jssjr90 - 11-27-2011

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!