Frictional Games Forum (read-only)
Locked and Unlocked doors§ - 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: Locked and Unlocked doors§ (/thread-12077.html)



Locked and Unlocked doors§ - jessehmusic - 12-25-2011

void OnStart()
{
AddUseItemCallback("", "Old Door key", "mansion_5", "KeyOnDoor", true);
AddUseItemCallback("", "Hidden Key", "cabinet_metal_1", "KeyOnDoor", true);
}


void KeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("mansion_6", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_6", 0.0f, true);
SetSwingDoorLocked("cabinet_metal_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "cabinet_metal_1", 0.0f, true);
}

My doos wont be locked


RE: Locked and Unlocked doors§ - Your Computer - 12-25-2011

Be more specific.


RE: Locked and Unlocked doors§ - SpudroSpadre - 12-26-2011

(12-25-2011, 08:45 PM)jessehmusic Wrote: void OnStart()
{
AddUseItemCallback("", "Old Door key", "mansion_5", "KeyOnDoor", true);
AddUseItemCallback("", "Hidden Key", "cabinet_metal_1", "KeyOnDoor", true);
}


void KeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("mansion_6", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_6", 0.0f, true);
SetSwingDoorLocked("cabinet_metal_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "cabinet_metal_1", 0.0f, true);
}

My doos wont be locked
I bolded the text that might be your problem.