You should Add: AddDebugMessage("Type anything you want here", false);
What this does, it says something at the very bottom very left. It says the thing you typed in the AddDebugMessage. Its useful to see if its even doing anything. You need to have the Debug Messages activated. Activate it here: C:\Documents and Settings\"YOUR COMPUTER USER NAME\My Documents\Amnesia\Main\"YOUR AMNESIA PROFILE NAME"\user_settings.cfg
Open it with your favorite text editing program. I recommend Notepad++. But you can still use the Notepad thing. If you don't want to get Notepad++ or don't have it, right click the file, Click Open With, select Notepad, Uncheck 'Always use the selected program to open this kind of file' If you don't uncheck it. It will mess up .cfg's FOREVER! So uncheck it. Press OK. It will open the file. Find:
ShowDebugMessages="false" Make: "false" to "true". It will show the debug messages. There are other useful and useless stuff to set true and false in the file if you want. You can always go back in the file and change it.
Add the Debug Message Code like this in the void UsedKeyOnDoor:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1");
AddDebugMessage("Type anything you want here", false);
}
This won't solve fixing the key not opening the door. This is just something to see if its even doing anything.