Why doesnt my key work? - 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: Why doesnt my key work? (/thread-15987.html) |
Why doesnt my key work? - Putkimato - 06-09-2012 I followed this video: http://www.youtube.com/watch?v=ABI7NUqkXW0&feature=related and my key doesnt work. hps file: //////////////////////////// // Run when entering map void OnEnter() { Haha there was space at my key name AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true); } void KeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false); RemoveItem("key_1"); } extra english lang: <LANGUAGE> <RESOURCES> </RESOURCES> <CATEGORY Name="Inventory"> <Entry Name="ItemName_key1">Cellar Key</Entry> <Entry Name="ItemDesc_key1">This key looks rusty and old.</Entry> </CATEGORY> </LANGUAGE> When i pick up key, it says: "Picked up Cellar key" like it should say, and when i use it door: "Cannot use item this way" Help please.. RE: Why doesnt my key work? - MaZiCUT - 06-09-2012 (06-09-2012, 10:26 AM)Putkimato Wrote: I followed this video: http://www.youtube.com/watch?v=ABI7NUqkXW0&feature=related You, just as me are trying to get help right, but i realized one thing when i searched for help that it was way easier to discover the fault myself and it was a good feeling that i was learning to script this without tutorials, you can use tutorials on hard items and then memorize them and then try something new by yourself like i'm doing so i'm glad you solved this by yourself. |