[REQUEST] Door Slowly Opens. - 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: [REQUEST] Door Slowly Opens. (/thread-9495.html) |
Door Slowly Opens. - Angerpull - 07-30-2011 Hello, can anyone provide me with a script that will make a door slowly open when I walk towards it? That would be great! -Angerpull RE: Door Slowly Opens. - palistov - 07-30-2011 Use these functions to make the door open. SetSwingDoorDisableAutoClose(string& asName, true); SetSwingDoorClosed(string& asName, false, false); AddPropImpulse(string& asName, float afX, float afY, float afZ, "World"); Fiddle with the float values to make the door open. Look at the door in your level editor. The blue line is the Z axis, the red line is the X axis. You'll probably not need any Y value (green line) unless you have a door leading through the roof or something weird like that. RE: Door Slowly Opens. - MrCookieh - 07-30-2011 Code: AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem); afX - direction along the X-axis afY - direction along the Y-axis afZ - direction along the Z-axis asCoordSystem - determines which coordinate system is used, usually “world” You have to use quite big numbers for doors, I think, but if your float isn't that big, it should open slowly RE: Door Slowly Opens. - Kyle - 07-30-2011 For a door, try the force of 1 - 3 in the correct direction. When I tried 5, it blasted open and closed fast... :/ |