![]() |
[LVL ED] Locked door - 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: [LVL ED] Locked door (/thread-16223.html) |
Locked door - nathanmcb - 06-17-2012 Can you help me with the script for the key and a locked door. //////////////////////////// // Run first time starting map void OnStart() { AddUseItemCallback("", "HU2key_1", "HUdoor", "UsedKeyOnDoor", true); } void UsedHU2key_1(string &in asItem, string &in asEntity) { SetSwingDoorLocked("HUdoor", false, true); PlaySoundAtEntity("", "unlock_door", "HUdoor", 0, false); RemoveItem("HU2key_1"); That is the script. What am I doing wrong? ![]() RE: Locked door - Obliviator27 - 06-17-2012 You have the UseItemCallback calling the function "UsedKeyOnDoor", while your unlock function is "UsedHu2key_1" Oh, and you're missing an end brace after the UsedHU2key_1 function. RE: Locked door - nathanmcb - 06-17-2012 Thank you.... I love you haha ![]() (06-17-2012, 04:38 AM)Obliviator27 Wrote: You have the UseItemCallback calling the function "UsedKeyOnDoor", while your unlock function is "UsedHu2key_1"Thank you so much! I'm so happy I could just scream!...... yey :3 |