Frictional Games Forum (read-only)
SetSwingDoorClosed won't work - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: SetSwingDoorClosed won't work (/thread-6897.html)



SetSwingDoorClosed won't work - Raymond - 03-15-2011

As the title said, when i walk into the area, the door won't close. I put it like this:
Code:
void CloseDoorScare(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
}

Please help.


RE: SetSwingDoorClosed won't work - Linus Ågren - 03-15-2011

That code doesn't close the door. It only makes it closed as if you didn't hold the handle down. To close it, you will need to make an AddPropImpulse.


RE: SetSwingDoorClosed won't work - nkmol - 03-16-2011

i've made the same ;

Code:
void OnEnter()
{
AddEntityCollideCallback("Player", "ScriptArea", "Callback", true, 1);
}

void CallBack(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("sewer_arched_1", true, true);
//ofc i added some more events to happen ;) this one i used for the door :P
}

now you have to fill your own propeties Smile
this wil suddenly close the door in a blink of an eye Tongue but it won't close it as a effect, just look unatural. If you can't see the door and it close, then you can use it i geuss Wink
if you want to see the door closing like a 'bang' you should use AddPropImpulse, as junkfood said Tongue


RE: SetSwingDoorClosed won't work - Raymond - 03-17-2011

I use the "AddPropImpulse" script for the door but it won't open, it only looks like someone kicked the door Undecided.


RE: SetSwingDoorClosed won't work - Linus Ågren - 03-17-2011

http://www.frictionalgames.com/forum/thread-6624.html
I had help with this. Hope you can understand what we did Smile


RE: SetSwingDoorClosed won't work - Raymond - 03-17-2011

(03-17-2011, 07:16 AM)junkfood2121 Wrote: http://www.frictionalgames.com/forum/thread-6624.html
I had help with this. Hope you can understand what we did Smile

Thank you very much Big Grin.