Problem with Door Code - 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: Problem with Door Code (/thread-18339.html) |
Problem with Door Code - Doughnut Boy - 09-15-2012 Hello everybody. I am currently making my first map and I for the life of me CAN NOT GET THE KEY TO WORK!!! when I pick it up it says "Picked up" and the key has no description. and will not work on the door. I have named the key in the right place and everything. Here is my Coding and lang files. void OnStart() { AddUseItemCallback("", "key_1", "castle_silent.ent", "unlockdoor", true); } void unlockdoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door", asEntity, 0, false); RemoveItem(key_1); } void OnLeave() { } and my extra_English.lang </LANGUAGE> <CATEGORY Name ="Inventory"> <Entry Name="ItemName_Key_1">Key</Entry> <Entry Name="ItemDesc_Key_1">"lawls"</Entry> </CATEGORY> </LANGUAGE> If anyone could help me I would be forever in debt XD RE: Problem with Door Code - Melvin - 09-15-2012 I think you have the wrong Syntax. here, use this void OnStart() { AddUseItemCallback ("", "key_1", "your_door", "unlockdoor", "true for autodestroy"); } asName - internal name asItem - internal name of the item asEntity - entity to be able to use the item on asFunction - function to call abAutoDestroy - determines whether the item is destroyed when used RE: Problem with Door Code - Melvin - 09-15-2012 Did it work? |