Frictional Games Forum (read-only)
[SCRIPT] Door open on it's own with script? - 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: [SCRIPT] Door open on it's own with script? (/thread-10959.html)



Door open on it's own with script? - Chronogyros - 10-24-2011

I want to make a door open a bit on it's own when crossing through an area, but can't quite figure out the script for it. I tried:

SetMoveObjectState("mansion_5", 1);


But that doesn't seem to do anything. Any suggestions?


RE: Door open on it's own with script? - Your Computer - 10-24-2011

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

IIRC, you have to first disable auto-close for it with the SetSwingDoorDisableAutoClose function. Then you may have to use the SetSwingDoorClosed function to open the door slightly (this may not be required). Then you use the AddPropForce function on the door.


RE: Door open on it's own with script? - flamez3 - 10-24-2011

(10-24-2011, 07:31 AM)Your Computer Wrote: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

IIRC, you have to first disable auto-close for it with the SetSwingDoorDisableAutoClose function. Then you may have to use the SetSwingDoorClosed function to open the door slightly (this may not be required). Then you use the AddPropForce function on the door.
What about just going into the editor itself and opening it from there? That is if he doesn't want it closed from the start.


RE: Door open on it's own with script? - Elven - 10-24-2011

@flamez3 "on it's own when crossing through an area"

BEst is to do what Your Computer said Smile



RE: Door open on it's own with script? - flamez3 - 10-25-2011

(10-24-2011, 02:32 PM)Elven Wrote: @flamez3 "on it's own when crossing through an area"

BEst is to do what Your Computer said Smile
Oops :S didn't read that part ;P