Frictional Games Forum (read-only)
opening door - 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: opening door (/thread-7307.html)



opening door - savior10946 - 04-12-2011

Hey I am trying to make my door called mansion_2 open when i unlock mansion_1.

void OnStart()
{
AddUseItemCallback("", "key_1", "door_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("key_1");
}

what do i need to add to make mansion_2 open once i unlock mansion_1 i dont know prop force or entity moving please help.soz for kinda long script.[/size]


RE: opening door - palistov - 04-12-2011

Use SetSwingDoorClosed("mansion_2", false, true); It should make it swing all the way open. If it doesn't work the way you want just add an impulse to the door with the right coordinates.