![]() |
Door open 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: Door open script (/thread-17532.html) |
Door open script - iFondue - 08-06-2012 Hello, Quick question, which script function do i have to use when I want to open a door when walking trough a script area? Don't uderstand me wrong I know how to make Callbacks for the script area, I only want to know the script function for the door... ![]() Greets iFondue RE: Door open script - Adny - 08-06-2012 The two functions you need are: SetSwingDoorDisableAutoClose(string& asName, bool abDisableAutoClose); disables the auto close of a door and AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem); Adds force to a prop. (be sure to use "world" as the Coordinate System) Hope that helped. RE: Door open script - The chaser - 08-06-2012 The script would be like this: void OnStart() { AddEntityCollideCallback("Player", "name of script area", "Open wished door", true, 1); } void Open wished door(string &in asParent, string &in asEntity, int alState) { AddPropForce("Name of door", 0, 0, 0, "world"); } void OnEnter () { } void OnLeave() { } I don't know what coordinates you should put, but you can test it. It should be something like this. Hope it helped. |