[SCRIPT] Amnesia how to make door open itself - 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] Amnesia how to make door open itself (/thread-16112.html) |
Amnesia how to make door open itself - Putkimato - 06-13-2012 Yeah, i wanna know how to make door open when i go near it. Not slowly, really fast like something would explode ! RE: Amnesia how to make door open itself - GrAVit - 06-13-2012 There are multiple ways of doing that, but probably the most convinient one would be to use the Area tool in the level editor. Place an area near the door where you would want the script to active, which would make the door open itself. Then you need to add the script, first you need to add a callback function like this for example: Code: void OnStart() Then the function, this is an example, it works if the door is unlocked. Code: void YOURFUNCTIONNAME(string &in asParent, string &in asChild, int alState) You may also add a sound effect when the door slams, and a particle effect as well. RE: Amnesia how to make door open itself - i3670 - 06-13-2012 SetSwingDoorDisableAutoClose("DOORNAME", true); and AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem); http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#props |