HPL Script Problem! - 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: HPL Script Problem! (/thread-17462.html) |
HPL Script Problem! - Brothersvv09 - 08-03-2012 I wanted to make two keys unlock two different doors (Key_1, Door_1, Key_2, Door_2) and i only found scripts to make only one key fit one door... I tried to make the script but it kept saying "ERR Error" and I dont know what to fix, it always says "} Detected 1,13" and something like that, I correct it but it keeps getting errors. Heres my script: void OnStart() { AddUseItemCallback("", "Key_1", "LockedDoor1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("LockedDoor1", false, true); RemoveItem("Key_1"); } { AddUseItemCallback("", "Key_2", "LockedDoor2", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("LockedDoor2", false, true); RemoveItem("Key_2"); } What do I take out? RE: HPL Script Problem! - Lizard - 08-03-2012 you cant use "UsedKeyOnDoor twice, you have to call one of them something else like UsedKeyOnDoor2 or something like that RE: HPL Script Problem! - Your Computer - 08-03-2012 Why do you post every issue of yours several times? Once is enough. Actually, consider this a warning. |