Frictional Games Forum (read-only)

Full Version: SetSwingDoorClosed won't work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
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
I use the "AddPropImpulse" script for the door but it won't open, it only looks like someone kicked the door Undecided.
http://www.frictionalgames.com/forum/thread-6624.html
I had help with this. Hope you can understand what we did Smile
(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.